Note: this information was written with Mac users in mind, however, users of other platforms may also find it useful.
Copying | Connecting | TestingUse secure copy:
The first argument (<source_of_file_to_be_copied>) is where your file is currently located on your computer. The second argument (<destination_folder>) is the destination and should be an existing folder. In the example above, the file "H1.txt" is being copied from the desktop of a personal computer to the private CS directory of a person with the CS login "bbadger". The general format for getting to your personal CS directory is /u/<first_letter_of_CS_login>/<second_letter_of_CS_login>/<CS_login>/
Note the slash (/) at end is important so that the source file is copied into the destination folder (as a file with the same name as the file on your computer) and not copied as a file with a new name (into a folder you don't intend it to go).
Go to the Terminal and enter:
where <username> is replaced with your CS login name.
Note: if your computer will not allow you to connect to best-linux.cs.wisc.edu, try connecting to best-mumble.cs.wisc.edu or best-king.cs.wisc.edu; if that doesn't work, try connecting to mumble-NN.cs.wisc.edu where NN is a 2 digit number between 01 and 40.
You may be prompted about something, just type in yes to add as a default.
You will be prompted for your CS account password. (Your password will not show up as you type it.) Press enter and you are logged in.
To logout, just type in "logout" on the command line.
From the Terminal: go into the directory with your source file(s)
To compile your program:
Enter: javac <filename.java> | Example: javac P1.java |
This will create <filename>.class | Example: P1.class |
To run your program:
Enter: java <filename> | Example: java P1 |
If your program takes command-line arguments add them after the main class. | |
Example: java P1 CLarg1 CLarg2 |