Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java command not working

 
Hemang Thanki
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I am using Windows XP SP1.

When I type javac <<File.java>> on commandline, it successfully compile the file.
But when i use java <<File>> on commandline,
"Exception in thread "main" java.lang.NoClassDefFoundError: <<File>>"
though the file consists of main method.

I also set the Path env. variable.

Can anyone suggest me some other approach ?

Regards,
Hemang
 
Tad Dicks
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Um this really isn't the right place for that question... but you have a problem with the name of the file and the name of the class not being the same (or at least thats my first impression).


-Tad
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to Java in General (beginner).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic