Edit-Compile on Unix, and test on Windows, in T-411
- Login to the unix server (hobbes).
- If needed, make a new sub-directory from the home directory.
Otherwise navigate to desired directory using the
cd command as many times as needed.
- Edit using pico.
- Compile at the command-line.
- Execute from your Windows machine.
- When do you follow this procedure: when you need
to execute a program that brings up a GUI.
=> Programs running on the Unix server can't bring up a GUI
on a Windows machine.
- The first four have been covered in
We will focus on Windows execution.
Execution in Windows
- Step 1: Open a command-prompt window:
Go to start → Run and type in cmd:
- Step 2:
In the command-prompt window, use the cd command
to navigate to the desired folder (e.g., testfolder2):
- Step 3:
Now list the files in there by typing dir
and you should see HelloWorld.java:
- Step 4:
Execute the program by typing java HelloWorld
at the command-prompt: