Edit-Compile-Test on Unix in T-411
Summary
- Login to the unix server (hobbes).
- Make a new sub-directory from the home directory.
- Edit using pico.
- Compile at the command-line.
- Execute at the command-line.
Login to the Unix server
- Step 1: Find and run SSH Secure Shell Client,
either from Start → programs or from double-clicking
the icon on the desktop.
- Step 2: Click on Quick-Connect and type in the
hostname (the full server name: hobbes.seas.gwu.edu)
and your SEAS username.
- Step 3: A password-box pops up. Enter your SEAS password.
Important: Your SEAS username/password may be
different from your GW or Blackboard username/password.
- Step 4: You should be logged into the server:
Make a new subdirectory (folder)
- Step 1: Use the mkdir command to
create a folder called testfolder2:
- Step 2: Enter the folder using the cd command:
- Step 3: See what's in the folder using the
ls command
=> You should see no output.
Edit using Pico
- Step 1: Fire up pico at the command-line
with the desired filename HelloWorld.java:
- Step 2: Now type in (or edit) the text for the program:
- Step 3: Use ctrl-X to save the file
and come out of the pico editor:
Compile at the command-line
Execute the program at the command-line
- Execute the program by typing java HelloWorld
at the command-line: