Skip navigation
The Australian National University

Accessing Lecture Code Via Eclipse and Mercurial

The following steps show you how to clone the lecture code in the lab setting. To clone the code from your own computer, you will need to set your computer up so that you can log in to partch.anu.edu.au via ssh without using a password. There are instructions here on how to set up your keys (if you're using windows, look here). Once you are set up so that you can log into partch without a password, you should be able to follow the instructions below, replacing the local path, "/dept/dcs/comp1110/public/code/lectures", with the remote path "ssh://<uid>@partch.anu.edu.au//dept/dcs/comp1110/public/code/lectures".

  1. Start Eclipse, either using the menu, or a terminal.

  2. Select the workspace you wish to use (sticking with the default should be fine).

  3. Wait for eclipse to finish loading.

  4. Go to the workbench (you'll only see this screen the first time you use Eclipse).

  5. Use "File", "New...", "Other...", and select "Clone Existing Mercurial Repository".

  6. Type in the path to the lecture code repository (/dept/dcs/comp1110/public/code/lectures), and then press "Next".

  7. The screen should now look like this. Press "Next".

  8. You should now see a screen like this. Press "Finish".

  9. Your workspace should now look something like this. The red marks indicate problems that we will fix in the next step.

  10. Your cloned copy does not yet have its build path set up (because the build path varies from computer to computer, so I did not check it in to the repository). You should now right click over the project name and choose "Properties". You should see something like the following. Choose "Java Build Path".

  11. You should see something like this. If you do not see a "JRE System Library [JavaSE-1.7]" (or "JavaSE 7", or similar, indicating that you have a 1.7 JRE), then you will need to remove the incorrect one (use the "Remove" button), and then add the JRE (use the "Add Library", and then "JRE System Library"). Once you do see the following, then you will need to add the Java FX jar.

  12. Click on "Add External JARs...".

  13. Use the file selector to navigate to /usr/local/javafx/rt/lib/jfxrt.jar or wherever jfxrt.jar is on your system. (In the labs, you'll need to click on "File System" to get to the root of the file system, so you can find /usr. (Under some circumstances on the Mac, you can't navigate through to the correct location. If you encouter this, you can create a link from the jar to your desktop then navigate to the link).

  14. The dialog should now look like this. Press "OK".

  15. Your workspace should now look something like this, with no errors.

  16. If you select the Arrays example from the first lecture, you should be able to run it by pressing the green run button.

  17. The example should execute correctly, and you should see something like this.

  18. You should also be able to run the JFXHelloWorld example by selecting it and pressing the green run buttom.

  19. You should see something like this.

Updated:  18 August 2012 / Responsible Officer:   JavaScript must be enabled to display this email address. / Page Contact:   JavaScript must be enabled to display this email address.