Java Installation
Printer-friendly version
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
NOTE: Mac users normally have the JDK already installed, and so can skip this step
- Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html
- Click on 'Download JDK' button under 'Java Platform, Standard Edition', and in the next window, click 'Download'
- Select your operating system from the list and click 'Continue'
- Click on the .exe link to download
- Once downloaded, follow the install instructions without changing any install parameters (especially install path)
- The JDK should now be installed
Download Dr. Java
- Go to http://sourceforge.net/projects/drjava/files/
- Click on link to download the JAR file (this should be the top link)
- Once the JAR file has been downloaded, there is no installation needed. It's best to put the JAR file in a folder on the C:/ drive for organizational purposes
- To run Dr. Java, double-click on the JAR file
- Look at the interactions pane when you open Dr. Java. There should be a line of text similar to 'Compiler ready: JDK 6.0_21 from C:\Program Files\Java\jdk1.6.0_21\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)
- Go to http://www.cosc.brocku.ca/files/downloads/java/Brock_packages.zip which will link to the download of a ZIP file
- 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
- 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!
- Open Dr. Java (double-click JAR file)
- In the menu bar, click 'Edit', then 'Preferences...'
- You should automatically have the 'Resource Locations' tab open, but if not click to open it on the left
- Under 'Extra Classpath', click 'Add'
- Navigate to the path of BasicIO.jar and Media.jar and add them both
- Click 'Apply', then 'OK'
- 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.
- Write a simple Java program using TurtleGraphics in order to test the installation
Troubleshooting and Notes
- Do not use the EXE of Dr. Java unless the JAR does not work at all. There have been difficulties getting it to run on certain operating systems and machines
- For Windows Vista, if you are having difficulties running the Dr. Java JAR or installing the JDK, check your user account permissions
- For Mac users, the JDK should already be installed. If not, make sure you have your Software Update working
