shell path issue - javac

Discussion in 'Mac Programming' started by Without A Clue, May 24, 2009.

  1. macrumors newbie

    Joined:
    May 24, 2009
    #1
    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
     
  2. macrumors G4

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    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.
     
  3. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #3
    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
     
  4. thread starter macrumors newbie

    Joined:
    May 24, 2009
    #4
    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
     

Share This Page