View Full Version : shell path issue - javac

Without A Clue
May 24, 2009, 12:00 PM
Greetings one and all:
Hi, I'm new to programming, and and trying to get started in Java 1.4.2 on OS X 10.3.

To begin, I tried programming the HelloWorld app. I saved it as a .java file with TextEdit, and tried to compile in Terminal. The name of the file and my Terminal command match. The response from Terminal is: "error: cannot read: HelloWorld.java
1 error" Not a very helpful error message, I'd say.

My .profile file reads:
"export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export DISPLAY=:0.0"

Do I need to change the PATH? Thanks, I'm sure you can see I have no idea what I'm doing here. Any ideas would be greatly appreciated.


May 24, 2009, 12:07 PM
Path isn't the problem. Odds are you saved it as rich text instead of plain text, which WOULD cause the issue you're having.

May 24, 2009, 12:36 PM
is your working directory the same place you saved your .java file? If not, are you providing the full path to the file, or just HelloWorld.java?


Without A Clue
May 24, 2009, 04:12 PM
Many thanks, Lee and wrldwzrd89! I changed the .java file to the correct directory and that solved the problem. Can't believe I didn't notice the directory issue, thanks again, I really appreciate the help. Have a good weekend!