- Once you have started Eclipse, click Window/Preference: Select Java/Install JREs on the left, click the Add. Button on the right side. On the first page of popup wizard, select 'Standard VM', then click Next.
- From the list produced by that command, select the JDK you want to use and put that path into the eclipse.ini file, making sure to append /bin/java to the path (eg, /Library/Java/JavaVirtualMachines/jdk1.8.051.jdk/Contents/Home/bin/java Note that the full path can either include java or not. For example, the following will both work.
- The setting in the following screenshot excludes the java.awt and java.swing packages from the possible imports and other Java search functionality. Please note that Eclipse shows (in its default configuration) only the packages that are used in the current workspace.
You are free to use whatever development environment you want, but CIS 121’ssupported IDE is Eclipse. This means the TAs will be able to provide the mosthelp on this IDE.
CIT 594 Eclipse Settings Spring 2011, David Matuszek. Required settings. Formatting according to Eclipse's Java Conventions built-in is mostly correct, but there is one problem: it indents using both tabs and spaces, which means that your formatting will look seriously messed up if someone views your program with different tab settings.
Step 1: Install Java 8
To run Eclipse, a Java Runtime Environment (JRE) must be installed. You canverify that you have the JDK 8 installed by running the `java -versioncommand (from the Command prompt in Windows or the terminal on Mac):
You should see output similar to lines 2-4 above. Any higher version of Java 8 will also work for this class.
If you do not have the JDK 8 installed, you can download it fromthis site.Select the version for your OS from the table titled “Java SE Development Kit8u171” (or whatever odd number it’s currently at). Do not download evennumbered one, as that one is not a safe build.
Alternatively, if you are running on OS X and prefer Homebrew, you can usethat. Be sure to install Java 8.
Note: It is best to do this step before installing Eclipse.
Step 2: Install Eclipse
We recommend that you use an Eclipse release version later than Eclipse “OXYGEN”, earlier versions will not work with the style checker. Make sure you have completedStep 1 before installing Eclipse.
- Visit the Eclipse download page
- Click on the link for your platform on the right side of the screen andinstall it by simply unpacking the downloaded file onto your desktop.
- Launch Eclipse.
- The first time you run Eclipse, you need to choose a workspace (a folder thatstores your projects).
Step 3: Make Sure Eclipse is Running Java 8
- Set Eclipse compiler to compliance level 1.8: Window $rightarrow$Preferences $rightarrow$ Java $rightarrow$ Compiler. Set the compliancelevel to 1.8.
- Set project compliance level: Click on the project you are working on in thepackage explorer, then Project $rightarrow$ Properties $rightarrow$Java Compiler. Set the compliance level to 1.8.
- Set default Eclipse JRE to Java 8: Window $rightarrow$ Preferences$rightarrow$ Java $rightarrow$ Installed JREs $rightarrow$ add$rightarrow$ Standard VM $rightarrow$ Directory (Find the installed JDK 8 version)
- The usual location depends on your operating system. You may want tosearch online if you have issues with this step, or come to OH.
- If you created a project before setting the default version to 1.8, youwill need to update your build path.
- Set Execution environment: Window $rightarrow$ Preferences $rightarrow$Java $rightarrow$ Installed JREs $rightarrow$ Execution Environment$rightarrow$ JavaSE-1.8