I'm trying to get the basic HelloWorld example to run, i;ve compile the following code in netbeans and found the generated .class file
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package HelloWorld;
/**
*
* @author jlovett
*/
class HelloWorld
{
private native void print();
public static void main(String[] args)
{
new HelloWorld().print();
}
static
{
System.loadLibrary("HelloWorld");
}
}
the generated .class located at "C:\Documents and Settings\jlovett\My Documents\NetBeansProjects\HelloWorld\build
\classes\helloworld\HelloWorld.class"
i then navigated to that directory in the command prompt and typed "javah -jni -o HelloWorld.h HelloWorld" to try and generate the .h file but i a series of errors.
C:\Documents and Settings\jlovett\My Documents\NetBeansProjects\HelloWorld\build
\classes\helloworld>javah -jni -o HelloWorld.h HelloWorld
error: cannot access HelloWorld
bad class file: .\HelloWorld.class
class file contains wrong class: helloworld.HelloWorld
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
com.sun.tools.javac.util.Abort
at com.sun.tools.javac.comp.Check.completionError(Check.java:164)
at com.sun.tools.javadoc.DocEnv.loadClass(DocEnv.java:149)
at com.sun.tools.javadoc.RootDocImpl.<init>(RootDocImpl.java:77)
at com.sun.tools.javadoc.JavadocTool.getRootDocImpl(JavadocTool.java:159
)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:330)
at com.sun.tools.javadoc.Start.begin(Start.java:128)
at com.sun.tools.javadoc.Main.execute(Main.java:66)
at com.sun.tools.javah.Main.main(Main.java:147)
javadoc: error - fatal error
2 errors
any help as to what i'm doing from or missing etc i much appreciated.
Regards, Jason