Working From Home

The department invests a lot of resources into keeping the computer lab open most of the week. There you can find help from a lab representative with computer use issues like copying files, using the right compiler, and running applications. Still, since almost everyone has their own computer, this page describes how you can get some of your homework done at home.

Downloads

Although most computers already have Java, you may need to download the development version to get access to a compiler. Also, if you would like to use Eclipse a download link is provided. Note that Eclipse is not necessary, any text editor can be used to write Java.

Download Java Development Kit
Eclipse Classic Download

Copying files to your account

As all homeworks require you to place your files in the appropriate folder on your account, you will need to copy files from your home computer to the system at school. Furthermore, just because homework seems to work on your home system, does not mean it is correct. You MUST test your homework in the lab to make sure it is correct.


Mac OS X / Unix / Linux
Mac OS X, Unix and Linux come with the necessary software to do this. The recommended technique is to use the terminal and the scp command. The terminal application on Mac OS X can be found in the Applications/Utilities folder. On Linux/Unix you need to just open new terminal. Here is an example of the scp (secure copy) command to to copy files from your Mac to the school system.

    scp Hw3.java myusername@lab3a.mathcs.emory.edu:cs170/hw3/

The command assumes your Current Working Directory contains the Hw3.java file. It also requires you to specify your username instead of "myusername". Finally, I randomly chose machine lab3a for this example. Any lab machine should do (lab1a - lab8g).

Windows
Emory offers the Web Drive client for Windows to all students at Software Express. This software can be used to connect to your account on any lab machine (e.g. lab3a.mathcs.emory.edu). Here are some steps to set up your Web Drive once you install it.

  1. Create a new site by clicking the "New Site" button
  2. Use one of the lab machines as site address/URL, e.g. lab3a.mathcs.emory.edu
  3. Select sftp as server type
  4. Uncheck anonymous login, and fill in your username/password

You can also download tiny program called pscp, which has the same syntax as scp for Mac OS X / Unix / Linux. To open a command line window on Windows system, go to Start->Run... and type cmd.

Remote login to lab machines

Mac OS X / Unix / Linux
Your MAC OS X / Unix / Linux comes with all the software that you need. Just open the terminal and type what follows:

    ssh -X myusername@lab3a.mathcs.emory.edu

Once you press return, you will be prompted for password. You might also be prompted to verify the key. If so, type yes and press return.

Windows
You will need to download an external software (that is free) called PuTTY. This is a direct link to the executable file. All you need to do is to save this file on your computer and run it. Once you start the program just use the following:
  1. In Host type: lab7a.mathcs.emory.edu
  2. Do not change other default options
  3. Click Open (bottom of window)

If PuTTY gives a security alert, click Yes (this might happen, but does not have to). Type your user name and password when prompted (the same as you use to login in lab). Then you will be logged in.

In the terminal window you cannot use gedit, which is graphical editor. Instead of it you can use pico. Pico is a very simple editor, where you can navigate using arrow-keys. To save the file press Ctrl+o, to exit Ctrl+x (as described in the bottom of the terminal). A little bit more information about pico can be found here: http://www.ece.uwaterloo.ca/~ece250/Online/Unix/pico/

Compiling and running Java

Mac OS X / Unix / Linux
Just open the terminal and type javac or java. Just like in the lab. You will find the terminal in the Applications/Utilities folder.

Windows
Open a DOS prompt from Start->All Programs->Accessories->Command Prompt (or just Start->Run... and type 'cmd'). Then try javac and java. Many of the Unix commands work here as well. Note: "ls" is called "dir" there.