Sign in to follow this  
Rydinare

[java] Eclipse, Java & SWIG

Recommended Posts

Hey Guys. I was playing around with SWIG lately and trying to expose some classes to Java. I was successfully able to expose my classes using SWIG, Visual Studio and then running Java from the command line on the .dll produced by VS and the .java files produced from SWIG. However, when I tried it in Eclipse, I kept getting things like the following: Exception in thread "main" java.lang.UnsatisfiedLinkError: no CppSource in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at JavaMud.main(JavaMud.java:5) In Java from the command line, I basically had to set up a few path variables. I couldn't figure out what the equivalent would be in Eclipse to get it to use the dll and java files (I'm assuming this is an Eclipse question). Any ideas? Thanks.

Share this post


Link to post
Share on other sites
In case someone else comes across this, I did solve it by matching a script that sets the PATH to the location where the dll exists prior to launching eclipse. This seemed to do the trick. I was pretty sure there should be another way to do it, based on how Eclipse works, but this will do.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this