PDA

View Full Version : java.lang.ClassNotFoundException


somealien
06-19-02, 15:51
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 :)

rnealejr
06-20-02, 00:31
Try the following:

java Contact (without the .java)

MrPugh
06-20-02, 17:52
The syntax of java is
java <CalssName>

So do not enter the Filename.