classpath / cannot find class
Posted on 1998-12-19
i am having problems with the classpath when trying to run a java program. normally, i do it from VisualCafe, so i don't know much about compiling and running for the command line for Java programs, but i ultimately want to run this program from another program, so i am trying to build the command to do so.
if i am in the folder in which my source code resides, from the MS DOS prompt (running windows NT) i can compile and run the Java program with no trouble:
if i try to overtly specify (i guess _override_), the classpath, specifying where the JDK code is, and where my source code is (because that is what i will need to do when i run foo from another program), like:
java -verbose -classpath C:\VisualCafeWDE\Java\src\java;D:\Java\applications\foo\ foo
it blows up, saying :
Unable to initialize thread: cannot find class java/lang/Thread
curiously, if i type:
to see what the classpath is, the path that it returns (that is set in autoexec.bat) does not contain the location of the
JDK code. this may not be so odd. i'm not sure of the role of the autoexec.bat in Windows NT from an MS Dos prompt. it may be completely ignored. It may be using the classpath set in Visual Cafe. I am using the Visual Cafe JIT compiler from the DOS prompt.
can someone tell what is going on?
and how to get what i need?