tmchuan
asked on
java's problems
i am now using the SAMS-Teach yourself Java2 in 21 days,but
faced some problems and needed for your help!
firstly,i used jdk1.2.2 version.According to the book,after installing
we might notice that one files installed in the JDK\lib subfolder
called classes.zip,but i cant find it.I used (Statr|Find|Files and folder)
to search the whole directory C: which i installed but the result was same.
second,i followed the book to set the path and type java -version and the
following displayed :"
java version 1.2.2
Classic VM (build JDK-1.2.2-W,native threads,symcjit)"
After that, i compiled the source files in the book--HelloDan.java
successfully!A files called HelloDan.class is found in the same folder that
contains HelloDan.java. But,when i run it,the following error displayed:
'Exception in thread "main"java.lang.NoClassDef FoundError :HelloDan'
and i even followed the book to set the classpath,the same thing happenned.
so ,what should i do?Is there anyway to rectify this problems?
**I am using Windows98,Pentium MMX 200 **
faced some problems and needed for your help!
firstly,i used jdk1.2.2 version.According to the book,after installing
we might notice that one files installed in the JDK\lib subfolder
called classes.zip,but i cant find it.I used (Statr|Find|Files and folder)
to search the whole directory C: which i installed but the result was same.
second,i followed the book to set the path and type java -version and the
following displayed :"
java version 1.2.2
Classic VM (build JDK-1.2.2-W,native threads,symcjit)"
After that, i compiled the source files in the book--HelloDan.java
successfully!A files called HelloDan.class is found in the same folder that
contains HelloDan.java. But,when i run it,the following error displayed:
'Exception in thread "main"java.lang.NoClassDef
and i even followed the book to set the classpath,the same thing happenned.
so ,what should i do?Is there anyway to rectify this problems?
**I am using Windows98,Pentium MMX 200 **
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://developer.java.sun.com/developer/technicalArticles/Programming/GettingStarted/
try running the java interpreter with the -cp option
including the current directory (assuming you just
compiled it there)
such as:
java -cp . HelloDan
this should pick up the class files from the current directory
including the current directory (assuming you just
compiled it there)
such as:
java -cp . HelloDan
this should pick up the class files from the current directory
check ur CLASSPATH
place . in it
ie
CLASSPATH = .;
cheers
RJ
place . in it
ie
CLASSPATH = .;
cheers
RJ
ASKER
Thanks a lots...good luck
ASKER
Thanks a lots...good luck
ASKER
Thanks to mrowka and rjackman ....
ASKER
Thanks to mrowka and rjackman ....
Thanx for the "A"