Results 1 to 3 of 3
  1. #1
    Karthika is offline Member
    Join Date
    Apr 2010
    Rep Power

    Default Error: The java class is not found:

    Hi all,
    I wrote a simple Java program "HelloWorld". When I try to run it I am getting message in console as "The java class is not found:".. but the program compiles fine. Any specific reasons for this?

  2. #2
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Pune, India
    Rep Power



    Make sure that the compiler can see your .class file thats generated after the compilation of your java program.

    Or you can use the -classpath or -cp option while running your java program and provide the path where your .class file reside.

    Refer here : Java Command Line

    Hope that helps,

    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

  3. #3
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Richmond, Virginia
    Blog Entries
    Rep Power


    is your classpath set to go somewhere else?
    also, look in the current dir of the file and use dir, is there a .class file?
    Finally, when you use java it is case sensitive.
    If you have your classpath set to some other location you can use the following
    Java Code:
    java -cp classpath classname

Similar Threads

  1. Error: no class definition found
    By toby in forum New To Java
    Replies: 6
    Last Post: 08-28-2011, 11:32 PM
  2. No Class Def Found Error:
    By fithous in forum Java Applets
    Replies: 0
    Last Post: 04-02-2009, 06:30 PM
  3. JRE rtapplet class not found error
    By avinash.natekar in forum Java Applets
    Replies: 11
    Last Post: 04-02-2009, 09:02 AM
  4. No main class found error
    By jhering1986 in forum New To Java
    Replies: 17
    Last Post: 03-28-2009, 03:34 AM
  5. No Class Def Found Error:
    By wrap23 in forum New To Java
    Replies: 9
    Last Post: 10-02-2008, 05:07 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts