Skip to content

Commit dc5e43c

Browse files
committed
JNI/JSSE: Add java.sh usage to README.md
1 parent 3828f97 commit dc5e43c

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,44 @@ $ ./examples/provider/ServerJSSE.sh
108108
$ ./examples/provider/ClientJSSE.sh
109109
```
110110

111+
### java.sh Script Options
112+
113+
The `java.sh` script compiles the native JNI sources into a shared library named
114+
either `libwolfssljni.so` (Linux/Unix) or `libwolfssljni.dylib` (MacOS).
115+
Compiling on Linux/Unix and Mac OSX are currently supported.
116+
117+
This script will attempt to auto-detect the `JAVA_HOME` location if not set.
118+
To explicitly use a Java home location, set the `JAVA_HOME` environment variable
119+
prior to running this script.
120+
121+
This script will try to link against a wolfSSL library installed to the
122+
default location of `/usr/local`. This script accepts two arguments on the
123+
command line. The first argument can point to a custom wolfSSL installation
124+
location. A custom install location would match the directory set at wolfSSL
125+
`./configure --prefix=<DIR>`.
126+
127+
The second argument represents the wolfSSL library name that should be
128+
linked against. This is helpful if a non-standard library name has been
129+
used with wolfSSL, for example the `./configure --with-libsuffix` option
130+
has been used to add a suffix to the wolfSSL library name. Note that to
131+
use this argument, an installation location must be specified via the
132+
first argument.
133+
134+
For example, if wolfSSL was configured with `--with-libsuffix=jsse`, then
135+
this script could be called like so using the default installation
136+
path of `/usr/local`:
137+
138+
```
139+
java.sh /usr/local wolfssljsse
140+
```
141+
142+
`java.sh` can use preset `CFLAGS` defines, if set in the environment variable
143+
prior to running the script, for example:
144+
145+
```
146+
CFLAGS=-DWOLFJNI_USE_IO_SELECT java.sh
147+
```
148+
111149
## Building with Maven
112150

113151
wolfJSSE supports building and packaging with Maven, for those projects that

0 commit comments

Comments
 (0)