Carnegie Mellon
  
Home

Theoretical aspects of CS (morning lectures)

Programming
Introductory section
Intermediate section
Advanced section

Robotics

Math theory

Faculty presentations




- Carnegie Mellon
- School of Computer Science
- Dr. Rudich's web site




Programming
Introductory section - Max Glick (email)


Reference Course materials How to program at home

In order to program at home, you need to download a copy of the Java Development Kit, or JDK. This is the same Java compiler that we use at CMU for Unix, but this version instead is for Windows. Here's how to download it, install it, and write programs using it:
  1. Go to the JDK download page, click on the Download link for Windows (U.S. English Only), accept the license agreement, and save the file to your desktop.
  2. Run the file (it starts with "jre") from your desktop. This will install the JDK.
  3. When the installation sequence asks you which directory to install it into, install it into the directory c:/jdk.
  4. After the installation has finished, click here to save a test program to your computer. Save it in the same folder, c:/jdk/bin.
  5. Download the extra.* package. Click on this link, and then save the file (it might look like nonsense) into the same folder, c:/jdk/bin.
  6. Click on the Start Menu and click Run. Type command and press enter. This will bring up a DOS command window that looks like the Unix command window, and it might take a few seconds to load.
  7. At the prompt, type cd \jdk\bin and press enter.
  8. Type jar -xf extra.jar and press enter. This will decompress the Extra Java archive.
  9. You're ready to program! Close the DOS window by typing exit and press enter.
  10. Open Notepad (yes, Notepad, it's in the accessories folder of the Start Menu). Go File/Open... and open Test.java from the folder c:/jdk/bin. (You might need to choose to view "all files" in order to open it.) Rename the c lass as something else, save the file as the same name as the class (remember the .java ending), and write your code.
  11. When you're ready to compile, save your file, but you don't need to quite Notepad. Open up a DOS command window (Start/Run/command), and swtich directories to c:/jdk/bin again. Type javac Test.java or whatever your file name is and press enter. This will compile your program: if there are errors, it will tell you. If it compiles without errors (it will return you to a new prompt), run your program by typing java Test or whatever your class name is and press enter. Have fun, and feel free to email me if you have any problems!


How to access the Leap account on the CMU samba server

  1. Obtain a copy of WS_FTP, which is a simple FTP (file transfer protocol) client for Windows. You can download a free copy at download.com.
  2. Install WS_FTP.
  3. Open WS_FTP.
  4. At the opening screen, in the "Host Name/Address" field, type intront.intro.cs.cmu.edu. In the "User ID" and "Password" fields, type the Leap username and password. You do not need to change any other fields. Click OK.
  5. WS_FTP will then attempt to connect to the Leap server. Notice that the display looks a lot like Windows Explorer, except there are two panels side-by-side. The left panel represents your own computer, and the right panel represents the server. Double-clicking on a green-arrow will change your current directory to the folder one level higher.
  6. To transfer files from the server to your own computer, navigate to the directory on your own computer in which you wish to save the files. Click the check-box below the panels that says "Auto" if it is not already selected. Then, navigate to the directory on the server where your files are stored. Click on the files (or folders) you wish to transfer, and click the leftward-pointing arrow between the two panels to transfer the files.
  7. Wait for your files to transfer.
  8. In the text log below the panels, the message Transfer complete will appear if the transfer is successful.
  9. Click the Exit button to end your session.