Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Java building #15

Open
qdot opened this issue Dec 13, 2010 · 1 comment
Open

Issues with Java building #15

qdot opened this issue Dec 13, 2010 · 1 comment
Labels

Comments

@qdot
Copy link
Member

qdot commented Dec 13, 2010

From email:

With the example JNIFalconCubeTest, I copied from /libnifalcon/build/lang/swig/ to /libnifalcon/lang/examples/java/JNIFalconCubeTest/ the files:

FalconDeviceBridge.java
FalconVec3d.java
JNIFalcon.java
JNIFalconJNI.java

And compile with:

javac JNIFalconCubeTest.java
java JNIFalconCubeTest

but show:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no JNIFalcon in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at JNIFalconCubeTest.(JNIFalconCubeTest.java:4)
Could not find the main class: JNIFalconCubeTest. Program will exit.

Then I read forums and changed JNIFaclconCubeTest.java in the line 4 to:

System.load("/libnifalcon/build/lib/libJNIFalcon.so");

Next, i got the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/alejo/libnifalcon/build/lib/libJNIFalcon.so: libmawt.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1003)
at JNIFalconCubeTest.(JNIFalconCubeTest.java:4)
Could not find the main class: JNIFalconCubeTest. Program will exit.

@sjtosco
Copy link

sjtosco commented Mar 14, 2016

Hi!. You can add JAVA_HOME variable in .bashrc. The commmand is like:

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64

Regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants