shell path issue - javac

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

  1. macrumors newbie

    May 24, 2009
    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:
    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.

  2. macrumors G4


    Jun 6, 2003
    Solon, OH
    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


    Jan 10, 2005
    Dallas, TX
    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

  4. thread starter macrumors newbie

    May 24, 2009
    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!


Share This Page