diff options
| author | Martin Desruisseaux <martin.desruisseaux@geomatys.com> | 2018-05-12 15:13:41 +0200 |
|---|---|---|
| committer | Martin Desruisseaux <martin.desruisseaux@geomatys.com> | 2018-05-12 16:24:15 +0200 |
| commit | 1830abc903c74b228de918a2830324006df7176a (patch) | |
| tree | b0d00e2ba3438a0c7403be3209b43da84ac2dc6b /jniwrap | |
| parent | 66cfd66f512b9c6accb3e045c7683b9df63b887d (diff) | |
| download | PROJ-1830abc903c74b228de918a2830324006df7176a.tar.gz PROJ-1830abc903c74b228de918a2830324006df7176a.zip | |
Add troubleshoting indication based on https://github.com/OSGeo/proj.4/issues/380 comments.
Diffstat (limited to 'jniwrap')
| -rw-r--r-- | jniwrap/README.md | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/jniwrap/README.md b/jniwrap/README.md index 3a6b35be..e5748cda 100644 --- a/jniwrap/README.md +++ b/jniwrap/README.md @@ -101,9 +101,9 @@ Of course, real applications would read them from a file or other data source. -### compile the Main code +### Compile the Main code -we assume that PROJ was compiled with the right flag to support the bridge to Java +We assume that PROJ was compiled with the right flag to support the bridge to Java. Therefore we have a library called `proj.jar`. Thus we compile the `Main.java` with the command: @@ -113,4 +113,15 @@ and execute the created test case with: java --class-path .:<path to the jar library>/proj.jar -Djava.library.path=<path to the libproj, if needed> Main -That's it, enjoy! + + +### Troubleshooting + +If an `java.lang.UnsatisfiedLinkError` is thrown at execution time, add the following line in the Java code: + + System.out.println(System.getProperty("java.library.path")); + +Then verify that the `libproj.so` (Linux), `libproj.dylib` (MacOS) or `libproj.dll` (Windows) file is located +in one of the directories listed by above code. If this is not the case, then try configuring the +`LD_LIBRARY_PATH` (Linux), `DYLD_LIBRARY_PATH` (MacOS) or `PATH` (Windows) environment variable. +If the problem persist, adding the `-verbose:jni` option to the `java` command may help more advanced diagnostics. |
