• Post Reply Bookmark Topic Watch Topic
  • New Topic

How humiliating....

 
Chris Montgomery
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Been developing java for over a year (using 'fancy' tools of course). Just starting to learn EJB - rules are, use a text editor and dos. Yep, the good ole' fashioned way...

I can't get anything to compile correctly - not even a quick hello world:

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

My readings indicate it's a CLASSPATH issue. I've tried adding everything but the kitchen sink to my CLASSPATH and it still does not work.

Here are all my paths:

User Variables -
PATH:C:\Progra~1\Java\AppServer\bin;C:\Progra~1\j2sdk_nb\j2sdk1.4.2

System Variables -
CLASSPATH: C:\Progra~1\Java\AppServer\lib\j2ee.jar;C:\Progra~1\j2sdk_nb\j2sdk1.4.2

J2EE_HOME: C:\Progra~1\j2sdk_nb\j2sdk1.4.2
JAVA_HOME: C:\Progra~1\j2sdk_nb\j2sdk1.4.2
Path: ...;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin;C:\Progra~1\j2sdk_nb\j2sdk1.4.2\bin\



Any other suggestions would be greatly appreciated!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35716
410
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris,
Convention is to use a capital letter for the first letter of a class. The command line is case sensitive. Try the following:

javac HelloWorld.java
java HelloWorld
 
Chris Montgomery
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That was it!

Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!