Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Native Interface : help needed  RSS feed

Brandon Chin
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've just visited Java Ranch and found the site quite interesting. It provides different ways of learning. I've used the search engine provided but still unable to find the solution to my problem.
I'm conducting a research on how to use Java Native Interface to call C Programs. I'm using Win98 and installed jdk 1.3 and set the classpath as follows:
SET PATH=%PATH%;C:\IMNNQ_95;C:\jdk1.3\bin
SET CLASSPATH=C:\jdk1.3\lib\;C:\jdk1.3\;

It works fine with javac to create a .class file but it fails when I use javah -jni. The error was "Error: Class MyNative.class could not be found." I've gone through dozens of web reference on the net but still can't find any solution. Can you help? Thanks in Advance and have a nice day.

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!