You are here

Java Installation

Installation instructions for Java JDK, Dr. Java and Brock Libraries.

 

These instructions will help you configure your Java environment to be similar to that of the Brock Computer Science labs. Follow these steps in order to ensure a proper installation. This has been tested on all Windows OS.

Download and Install the Java JDK

  1. Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html
  2. Click to download Java SE 8u144 (second entry lower in the window) (NOT Java SE 9 and NOT the JRE)
  3. You must accept the licence agreement to download the software
  4. Select your operating system from the list and click 'Continue'
  5. Once downloaded, follow the install instructions without changing any install parameters (especially install path)
  6. The JDK should now be installed

Download Dr. Java

  1. Go to http://sourceforge.net/projects/drjava/files/1.%20DrJava%20Stable%20Releases/
  2. Click on the top link to download the latest stable version
  3. Windows Users - Click on .exe to download the .exe file.and double click on the .exe file to open it.
  4. Mac Users follow these steps:
    1. Click to download the JAR file
    2. Click keep when a warning appears that the type of file can harm your computer
    3. Copy the JAR file to your desktop
    4. Double click on the desktop JAR file
    5. A pop up box will appear saying that it's can't be opened because it is from an unidentified source. Click ok to disregard message
    6. Open up System Preferences by clicking Apple in top left hand corner and opening System Preferences
    7. Click on Security & Privacy icon
    8. Click the Open Anyway button (beside message saying that the JAR file was blocked from opening)M/li>
    9. Click the Open button


Look at the interactions pane when you open Dr. Java. There should be a line of text similar to 'Compiler ready: JDK 8.0_45 from C:\Program Files\Java\jdk1.8.0_45\lib\tools.jar.' If you do not see this line (or something very similar), then the JDK has not been installed properly. It might also say something such as 'Eclipse Compiler ready' which is perfectly fine as well. Dr. Java is able to locate the JDK automatically, and so will not function if it cannot find it.

Dr. Java is now ready to use!

Download and add Brock Packages (Media.jar and BasicIO.jar)

  1. Go to http://www.cosc.brocku.ca/files/downloads/java/Brock_Packages.zip which will link to the download of a ZIP file
  2. Once downloaded, extract the files by right-clicking the ZIP directory and selecting 'Extract All'. If you do not see this option (or another extraction method) you must either download WinZip or WinRar
  3. Move the two JAR files to a known directory. A good suggestion is to place them in the same folder as Dr. Java on the C:/ drive, or a folder on their own on C:/ named 'Brock Packages'. Make sure you remember this path!
  4. Open Dr. Java (double-click JAR file)
  5. In the menu bar, click 'Edit', then 'Preferences...'
  6. You should automatically have the 'Resource Locations' tab open, but if not click to open it on the left
  7. Under 'Extra Classpath', click 'Add'
  8. Navigate to the path of BasicIO.jar and Media.jar and add them both
  9. Click 'Apply', then 'OK'
  10. The Brock packages should be ready to use! Make sure you do not move the Brock packages once you've added them, otherwise you'll need to go over these steps once more.
  11. Write a simple Java program using TurtleGraphics in order to test the installation

Troubleshooting and Notes

  1. We are using the stable version of Dr. Java from Aug 2014
  2. For Windows Vista, if you are having difficulties running the Dr. Java JAR or installing the JDK, check your user account permissions