Java Help

Discussion in 'Mac Help/Tips' started by Wildcat, Mar 11, 2003.

  1. Wildcat macrumors regular

    Joined:
    Apr 23, 2002
    Location:
    Eugene, OR
    #1
    Is there a way to compile and run single .java files from the terminal? I have heard this is possible. Or if that is not possible does anyone know another way to compile and run java in OS 10.1.
    Thanks
     
  2. ibookin' macrumors 65816

    ibookin'

    Joined:
    Jul 7, 2002
    Location:
    Los Angeles, CA
    #2
    Re: Java Help

    Here is the way to do this:

    1. Navigate to the directory where your .java file is located
    2. Type "javac <filename>"
    3. To run the program, type "java <filename without extension (.java)>"
     
  3. Wildcat thread starter macrumors regular

    Joined:
    Apr 23, 2002
    Location:
    Eugene, OR

Share This Page