Java Documentation

We suggest you bookmark this page:
Java 1.6 Documentation

Submitting code

Follow these directions, and plugin your instructor's username appropriately: nchamber or sikora

  1. If you are working in your room, scp the data to the lab machines. For example:
    scp aFile.java username@machine.academy.usna.edu:~/where/you/want/to/put/it
    Using the option -r will allow you to move whole directories.
  2. From one of the lab machines, run /courses/your-instructor-username/submit (note the opening '/'). The command will result in a list of assignments open for submission.
  3. Put your code into a directory with the exact same name as the assignment you are trying to submit. For example, if you are trying to submit a Project01, your directory cannot be called "project01" or "Project1." This is the most common source of difficulty.
  4. Step out of that directory (cd ..), so that if you ran ls, you would see your "Project01" (or whatever) directory.
  5. Run /courses/your-instructor-username/submit Project01/
    Make sure this submit script lists your .java files.
    It should also say "Submission successful." at the end. If either is not true, it didn't work.

USNA CS Department

Getting a Virtual Machine for your machine in Bancroft

  1. Install the Windows version of VMWare Player
  2. Download and unzip the Virtual Machine image
  3. Run VMWare Player and select your unzipped image. Upon opening, if asked, click the "copied image" button.
  4. The username is "mid". The password is "gonavy" (no quotes). You should change your password to something unique or anybody will be able to log into your VM.

  5. If you are using an older image and your system reports that javac cannot be found. Run the following two commands, and enter your password when prompted:
    • sudo apt-get update
    • sudo apt-get default-jdk

Getting Emacs on your Virtual Machine

Run these two commands from a terminal inside Ubuntu:

  1. sudo apt-get update
  2. sudo apt-get install emacs23

Getting Eclipse on your Virtual Machine

Run the following commands from a terminal inside Ubuntu. It will prompt you for the ubuntu password (gonavy), and make sure to choose "Y" when it asks you to install the packages:

  1. sudo apt-get install eclipse-platform
  2. sudo apt-get install eclipse eclipse-jdt

For good measure, run one more command:

  1. sudo apt-get update

Restart your VM. If everything worked without error, you should find Eclipse in your Programming menu under Applications. Or just type 'eclipse' in the terminal!

What to do once eclipse starts up? Take your first steps with our very short startup guide.