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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exception in thread "main" java.lang.NoClassDefFoundError: hello

Status
Not open for further replies.

yytan

Programmer
May 8, 2002
113
MY
hi there;


all the while i can compile and run java application at my pc. but after i installed tomcat
set the environment variable, i got some problem.

i done easy java program to display hello. when compiling no error, but when java hello

--error--
C:\yyhome\develope\Java>java hello
Exception in thread "main" java.lang.NoClassDefFoundError: hello

i have edit autoexec.bat and:

set classpath=.
set path = jdk1.3.1_01\bin

--in environment variable-- in order to run tomcat

i have set

catalina_home = C:\tomcat4.0
java_home = C:\jdk1.3.1_01

may i know what to do?
 
Check that the class name is all lower case, if the class is named 'Hello' rather than 'hello' you will get this problem.
 
i have checked, it is all small letter. any another possibility that cause this problem? shall i uninstall and install jdk again? is it advisable?
 
hi.

in no java expert, but you should try
set classpath = .; jdk1.3.1_01\bin

instead of

set classpath=.
set path = jdk1.3.1_01\bin

i think mabye you are overiding the setclasspath command with the set path command.

mabye also try
path=%path%;c:\jdk1.3.1\bin

this appends the path statement, not overides it

you should read
 
stickytim;

thans for your advice and explanation :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top