Javah : Class Not Found Error

Hi .,

I am trying to write my first native method under all windows (98/2000 and even under NT) environments , and I have written a simple java source(say MyProgram.java) ,as it is shown at the Javasoft documentation. This file compiles cleanly and I get the MyProgram.class.

But when I then run javah, it tells me 'Error: Class *** could not be found.'. The java file has no 'package' line, and both .java and .class are lying in the same directory where I am trying to run javah.

The syntax I used is :

c:\MyDir>javah -jni MyProgram

The .class files resides in the same dir (C:\MyDir).

I am not appending .class when i use javah.

I would be thankfull for quicker replies

as the subject is too urgent .Thanks in advance

Issac

[829 byte] By [isaacmadhusudan] at [2007-9-26 5:15:43]
# 1
javah -cp . ........The dot means "look in this directory".
bschauwe at 2007-6-29 19:18:56 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
Thanks.,I used -classpath with the correct path of the class before -jni and that gave the result .Thanks againIss
isaacmadhusudan at 2007-6-29 19:18:56 > top of Java-index,Java HotSpot Virtual Machine,Specifications...