Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002
    Location
    MA
    Posts
    4

    Unanswered: java.lang.ClassNotFoundException

    Hello to all,
    i'm trying to run a java file under linux. the file is called Contact.java

    i compiled the file (javac Contact.java) and it worked fine, no errors or anything. but when i try to run the file (i type in: java Contact.java) it gives me this error:

    java.lang.ClassNotFoundException: Contact/java
    at java.lang.Class.forName(Class.java:native)
    at java.lang.Class.forName(Class.java:52)

    does anybody know why its doing this? Thanks

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Try the following:

    java Contact (without the .java)

  3. #3
    Join Date
    Jun 2002
    Posts
    8

    Re: java.lang.ClassNotFoundException

    The syntax of java is
    java <CalssName>

    So do not enter the Filename.

Posting Permissions

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