General Information

We use Java 8 and Eclipse for Java Developers (Luna) Integrated Development Environment (aka: Eclipse IDE, or simply Eclipse) for writing, compiling and testing Java programs in CS302 (and subsequent CS courses). Both Eclipse and Java are available for FREE and have versions for all popular computing platforms (e.g., Windows, Mac, Linux).

We strongly encourage students to install Eclipse and Java on your computers making it possible for you to practice programming at your convenience. This practice is invaluable for learning the Java language and improving your programming skills. (We also encourage students to get practice programming by signing up for CodeLab.)

If you choose to install Eclipse and Java, you are agreeing to be responsible for backing up your own work! Losing your work because your computer crashes or having trouble with your computer are not acceptable excuses for not getting an assignment done on time. You'll also need to be responsible for correctly installing and configuring this software. The vast majority of students do not have problems with this, but we make no guarantee that all students will be able to do so.

If you're not confident about downloading, installing and configuring software then you might try to get help from a friend or a classmate. You are also welcome to ask lab consultants for help during scheduled hours to install this software, but note they are not able to be a system administrator for other issues with your computer. If you are having problems with your computer, you can always complete your course work using a lab computer instead.

The CS department provides instructional lab computers with Eclipse 4.4 (Luna) and Java 8 installed for students to do their lab work, their programming assignments, and to practice Java programming. Doing the work on a lab computer has the benefit that your work is automatically backed up each night.  Students who have earlier versions of Java should be fine for all programming assignments. We do hope to use JavaFX for the code we provide to students for Program 3.  If that is the case, then Java 8 would be required for that assignment.  Students can always work in the labs, if their home system is not configured for a particular task.

Installation of Firefox

We strongly recommend that you install the Firefox web browser. It's a free program like Eclipse and Java, and it is needed to use the CS302 web form. You you can get it from www.mozilla.org/en-US/firefox. Click on the download link for the operating system and language of your choice.

Installation of Eclipse IDE for Java Developers

  1. If you are running Linux or Mac:
    1. Go to Eclipse IDE for Java Developers. to see if there is a version for your OS.
    2. Select your platform (win/mac/linux and 32 or 64bit)
    3. Select one of the available download sites.
  2. If you are running Win32 or Win64, you can download our copy of the mars release:
    Win32: (eclipse-java-mars-R-win32.zip) (Updated 9/3/15)
    Win64: (eclipse-java-mars-R-win32-x86_64.zip) (Updated 9/3/15)
  3. Be sure to select Save to your computer. Don't try to install from the web site.
  4. Wait for download to complete.
  5. Find your downloaded file and move it to your program files folder before extracting.
  6. Right-Click to select where to extracting the files or double-click to extract all files to folder in current directory.
  7. Ignore fille name size is too long error if you get it. (we won't use that add-on).
  8. Launch the Eclipse program to launch Eclipse IDE.
  9. Follow the instructions found on the Eclipse web site and try the Eclipse tutorial (Link to tutorial can be found in Lab 1 and on the course Menu).
  10. Note: Some students have also had to install the JRE on Windows machines. Google "JRE" and download and follow those instructions to install the Java 8 version on your home computer before launching Eclipse.

    1. Install Java SE 8u60 (or other latest version of Java SE - standard edition)
      1. Download the latest version of the Java SE. Click on the "Download" button under the label JDK. In the new "Java SE Downloads" page that appears, click on the radial button to "Accept License Agreement" and then search for the appropriate platform. Most windows users should select "jdk8-u60-windows-i586.exe" or "jdk8-u60-windows-x64.exe". You might need to save the file if a dialog box appears. Note this file is quite large so a fast connection to the Internet is essential.
      2. Double-click on the previously downloaded file and follow the installation instructions. We strongly recommended that you accept all defaults during the installation process to prevent configuration problems later.
  11. Verify Eclipse is working by doing the Eclipse Tutorial and see the common problems listed below.

Installation on Mac OS X 10.5.10 and later

These instructions have not been confirmed for the new release.  If you plan on using a Mac you should be using OS X 10.5.10 or greater. Last we checked, Mac OS X 10.9.4 (Lion) was the latest release.

  1. Install Eclipse (We believe that this now includes Java)
    1. Download Eclipse.   Most Mac users should use "eclipse-java-luna-R-macosx-cocoa-x86_64.tar.gz".
      Click on the "(http)" in the Download column. Click on "download" at the bottom of the next page that appears, which takes you to the appropriate Eclipse downloads page. In the new page, click on the icon that looks like a green arrow pointing down at a line. Save the file to begin downloading.
    2. Note that Eclipse doesn't have an installation process like Java. Double click on the previously downloaded file to untar it, and then you're ready to go. In the folder named "eclipse", double click on the big blue dot to launch Eclipse. You might also want to create a shortcut on the desktop to simplify the launching of Eclipse.
  2. Verify Eclipse is working by doing the Eclipse Tutorial and see the common problems listed below.
  3. If not working, you may have to install Java separately
    1. If this does not work, you may need to find a different compatible version of Java. Contact Apple support. This update is not necessary if you are running a newer version (e.g., Snow Leopard, Lion).

Common Problems (have not been confirmed for this release of Eclipse and Java)

  • If you're getting: Selection does not contain a main type when trying to run a program:
    1. For new projects, when you create them, choose "Use project folder as root for sources and class files" instead of "Create separate folders for sources and class files". This choice shows up when you choose to create a new java project.
    2. If you didn't do 1. when you created your project, you will see a folder called "src" as part of your project. Move your .java files into that folder and you should be able to run your program afterwards.
    3. If you didn't do 1., you can alternatively right-click your project, choose properties, and modify the java build path. Choose the "Source" tab after clicking on "Java Build Path" in your properties. You will see <projectname>/src in the list of source folders on build path. Remove that. Then click "Add folder", check the checkbox next to <projectname> and click ok. You should be able to run your program afterwards.
  • If you are getting NoClassDefFoundError in Eclipse on a Mac:
    • If you haven't, update the version of Java on your machine according to the instructions above.
    • You might also need to change the JRE System Library to 1.8 in the project Properties → Java Build Path → Libraries tab.