PDA

View Full Version : Java Help




Wildcat
Mar 11, 2003, 12:55 PM
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



ibookin'
Mar 11, 2003, 01:12 PM
Originally posted by Wildcat
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

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)>"

Wildcat
Mar 11, 2003, 01:33 PM
thanks that works great