I added classpath to it, and now I get this message:
C:\R>javah -classpath C:\R InvokeMasterCom
error: cannot access InvokeMasterCom
bad class file: C:\R\InvokeMasterCom.class
class file contains wrong class: RegistrationSystem.InvokeMasterCom
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:
169)
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:156
)
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
> > javac Test1
> > javah -jni Test1
[quoted text clipped - 10 lines]
>
> --
9GB - 07 Jul 2007 19:31 GMT
Oops! sorry, its fixed now...
Thanks :)
> I added classpath to it, and now I get this message:
> C:\R>javah -classpath C:\R InvokeMasterCom
[quoted text clipped - 34 lines]
>
> > --
9GB - 07 Jul 2007 19:32 GMT
But anyway, just a question, why do we explicitly have to specify the
classpath for it?
> I added classpath to it, and now I get this message:
> C:\R>javah -classpath C:\R InvokeMasterCom
[quoted text clipped - 34 lines]
>
> > --
Gordon Beaton - 07 Jul 2007 20:13 GMT
> But anyway, just a question, why do we explicitly have to specify the
> classpath for it?
Because the argument to javah, java and many other tools in the JDK,
is a classname, not a filename. You need to tell it how to resolve the
classname in order to find the file.
/gordon
--