Connecting Tech Pros Worldwide Forums | Help | Site Map

Error at runtime in JDK 1.5.0_9 (J2SE)

Newbie
 
Join Date: Nov 2006
Posts: 2
#1: Nov 14 '06
Hi...
im really new to java, and ive tried to program a simple HELLO WORLD app, which displays the text in the command line (im using Windows XP Pro, so its MS DOS). Everything is fine during compiling, but when i attempt to run, typing "java HelloWorldApp", java displays this message:

Exeption in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp

pleas can sum1 help...
thanks!!!;-)

Expert
 
Join Date: Nov 2006
Location: UK
Posts: 1,320
#2: Nov 14 '06

re: Error at runtime in JDK 1.5.0_9 (J2SE)


Quote:

Originally Posted by Radster

Hi...
im really new to java, and ive tried to program a simple HELLO WORLD app, which displays the text in the command line (im using Windows XP Pro, so its MS DOS). Everything is fine during compiling, but when i attempt to run, typing "java HelloWorldApp", java displays this message:

Exeption in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp

pleas can sum1 help...
thanks!!!;-)

could be a few things
(1) check that the class is called HelloWorldApp, not HelloWorldapp or HelloworldApp, etc. Java is case senstive so you must get the class correct.
(2) are you in directory which contains the HelloWorldApp.class file - use command dir to check
(3) is your current directory on the java classpath
Newbie
 
Join Date: Nov 2006
Posts: 2
#3: Nov 14 '06

re: Error at runtime in JDK 1.5.0_9 (J2SE)


hi! thanks for the help! i'll make sure to check the name of the class file.
as i said, im really new to java, so i didnt understand what you meant by the "current directory on the java class path".
thanks once again, though!;-)
Reply