This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes jni classpath problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "jni classpath problem" Watch "jni classpath problem" New topic
Author

jni classpath problem

moshi cochem
Ranch Hand

Joined: Nov 10, 2009
Posts: 91
Hi,
I'm working with jni. I use the Caffeine foundation.
In my .net "Test" project I'm calling to a java class (I'll name it *A*). It is working just fine.
Now, I want *A* class to call to another java class that located inside of a jar file.
I developed *A* in Eclipse, so that in Eclipse I gave it a classpath including that jar file. Thats why
it works fine there. I can make the connection between them inside the Eclipse, since the jar is in the class path.

I guess that in my .Net JNI project, since I get an Exception of NoClassDefFoundError... that when I'm taking the class
out of the Eclipse environment, I should take with it also the class path, if I want it to use that jar file.
I hope that I'm understood.

I'll appreciate any help, thanks in advance.
moshi cochem
Ranch Hand

Joined: Nov 10, 2009
Posts: 91
Hi ,
I found the solution of what I was looking for.
I want to write it down for the other people who will face with it in the future.
So it's very simple - in the app.config file in your .net project you
have entries to describe the class path. There you can insert anything
you want to be inside the class path.
Thanks for those who tried to help.
 
 
subject: jni classpath problem