Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Without A Clue

macrumors newbie
Original poster
May 24, 2009
2
0
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.

-Mike
 
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.
 
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?

-Lee
 
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!

-Mike
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.