The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2002

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Path is okay, but where's the file

Posted by Matt Gerrans on January 20, 2002 at 1:46 PM

> I installed jdk1.3 and set the path as PATH=C:\JDK1.3.1\BIN;
> when I try to compile my first program I get a message"error: can not read:HelloWorld.java
> any suggestion?
> :(

Sounds like the compiler didn't find the file. Check these things:


  1. The file is indeed in the current directory (On Windows: "dir *.java", or on Linux/Unix: "ls *.java").
  2. Make sure the case of the file name exactly matches what you are telling the compiler. If it is "helloworld.java" and you are specifying "HelloWorld.java" then the compiler won't find it. Of course, the public class name inside the file must exactly match the file's name, too.





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us