Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NT 4.0 javac to java

Status
Not open for further replies.

HavaTheJut

Programmer
Jun 26, 2001
93
US
I feel like such an amateur asking this question, but I can't seem to get the syntax right. Once the classes are compiled with javac, what is the correct syntax for the java command? I know how to run classes on windows 9x, but on NT 4.0, the only way I can get it to work is by generating the native header files with javah. This is fine for nt, but I don't want to include the headers in my jar file. Please help.
 
you call java CLASSNAME. ensure the class, either class file or within a jar, is in your classpath. you cna check the classpath on NT:

echo %classpath%
 
on NT you normally have to include the classpath parameter in the command e.g

java -classpath <your class path> <classname>

in fact if your classes are in the same directory just type

java -classpath . <classname>

and that should work.
 
Thanks. I was using -cp before to specify the classpath, but I guess that didn't work.
 
I have had similar problems with -cp myself.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top