Reason And Sol for ERROR "java.lang.NoClassDefFoundError "

5 visualitzacions
Ves al primer missatge no llegit

nitin...@yahoo.com

no llegida,
27 de maig 2005, 5:28:1427/5/05
a giGA...@googlegroups.com
I have downloaded j2sdk1.4.2_08 and installed on my computer. The
installtion run succesfuly and dir name j2sdk1.4.2_08 is created on c
drive. I had written simple java program and compile, It cmpile but
when I run using "java Program_name" at dos prompot it give error
"Exception in thread "main" java.lang.NoClassDefFoundError: "
what is prob.

what are other reason for this type of error.

and also tell what is difference between j2sdk and jdk installation

thanks

nitin...@yahoo.com

no llegida,
27 de maig 2005, 5:42:5527/5/05
a giGA...@googlegroups.com
Both Installation are same.
And about Error, This error will come the class path is not set . u
need to set the class path or else when running the program normally at
DOS prompt run it as prompt> java -classpath c:\JAVA_DIR_NAME\lib\

the last syntax is effective when when ur r not able to set environment
variables.

Nishant Sonar

no llegida,
27 de maig 2005, 9:45:3827/5/05
a giGA...@googlegroups.com

 
switch to the directory wher the progranm lies (rather the class file u compiled to lies ) and try running it again.
alternately u can switch to

path=c:\myprogs

and try

Nishant Sonar
20, Tirupati Apartments,
Shivtirth Nagar,Paud Road
Kothrud, Pune(M.S.)
Mob:9823871676
Tel:020-25398002

Respon a tots
Respon a l'autor
Reenvia
0 missatges nous