Installing Java at home
CS 12300
Programming I: Java
Fall, 2015
To write Java programs you need some kind of Java development environment. There are a great number of Java development environments available. Most are complicated and designed for working on large Java projects. In this course, we will use an "educational" development environment called DrJava.
Before you can install DrJava, you must install a JDK (a Java Development Kit). We will be using the Java SE 8 Development Kit. The steps below tell you how to install this programming environment along with DrJava. There are roughly two parts to this installation. The first part (Step 1) is installing the JDK and the second part (Steps 2-5) is installing and configuring DrJava.
- Step 1:
-
Install JDK 8. Use the link at the end of this paragraph to go to Oracle's download page. You want to download the "Java SE Development Kit 8u60". After you check the "Accept License Agreement" button, you can click on the appropriate link to an installation program. Be sure to choose the version for your operating system (NOTE: Unless you have a very old version of Windows, download the "Windows x64" version of the JDK). Be sure to notice where on your computer the installer program is downloaded to. After you have downloaded the installer program to your computer, double click on the installer program to run it. Accept all of the default options that the installer program presents you with.
Java SE Development Kit 8 download page
- Step 2:
-
Use the link at the end of this paragraph to download a zip file containing a copy of the DrJava program. Save the zip file on your desktop.
cs12300.zip
- Step 3:
-
The last step downloaded a zip file, cs12300.zip . Right click on this zip file and choose "extract all" from the context menu. After unzipping this file, you will have a new folder called cs12300 on your desktop. Move this folder to your C:\ drive, so that you now have the folder C:\cs12300 .
- Step 4:
-
Open the folder C:\cs12300 . In the folder there is a program called drjava-stable-20140826-r5761.exe . This is the DrJava program. Double click on this file to run DrJava. The first time you run DrJava, it will present you with a dialog box asking if you want to associate .java files with DrJava. Click on the "Always" button. After DrJava starts, use the "File -> Quit" menu item to quit DrJava.
- Step 5:
-
In this step we will test your DrJava installation.
Test your Java and DrJava installation by double clicking on the file DrJavaExperiment.java that is in the C:\cs12300 folder. Step 4 associated java files with DrJava, so double clicking on the DrJavaExperiment.java file should open that file in DrJava.
Click on DrJava's "Compile" button. You should see a "Compilation completed." message in the lower "Compiler Output" pane of the DrJava window and you should now find a new file, DrJavaExperiment.class , in the C:\cs12300 folder. Click on DrJava's "Run" button. You should see a small window pop up on your computer screen.
The Java JDK and DrJava should be installed properly at this point.
|
When you are editing files with DrJava, remember to save your work frequently (at least every 10 minutes), otherwise it may be Abort, Retry, Ignore?