NOTE: You are free to use whatever development environment you want, but CIS 121’s supported IDE is IntelliJ. However, these are former resources from when the course used to support Eclipse.
To run Eclipse, a Java Runtime Environment (JRE) must be installed. You can verify that you have the JDK 8 installed by running the `java -version command (from the Command prompt in Windows or the terminal on Mac):
$ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
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 from this site. Select the version for your OS from the table titled “Java SE Development Kit 8u171” (or whatever odd number it’s currently at). Do not download even numbered one, as that one is not a safe build.
Alternatively, if you are running on macOS and prefer Homebrew, you can use that. Be sure to install Java 8.
Note: It is best to do this step before installing 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 completed Step 1 before installing Eclipse.
The plugin is a linter that will highlight code style violations as warnings in Eclipse.
Your code will be graded on style. This plugin allows you to easily spot violations so you can avoid losing easy points on your programming homework. In addition, our style grader on Gradescope will grade based on the configurations set up in the Eclipse plugin. In other words, Gradescope and this plugin will look for the same style violations.
NOTE YOU NEED ECLIPSE OXYGEN OR HIGHER TO INSTALL THIS PLUGIN
Known Bug In Windows: There is a bug in Windows that occurs if the path to your current project includes a space. If there is a space in the path name, the style checker will not work. Example of a path name with a space (between John and Smith):
C:\John Smith\eclipse-workspace\hw0
If the style checker were being used in the project located in that path, then it will not work. To fix the issue, move the project or eclipse to a folder that does not have any spaces in the path name:
C:\eclipse-workspace\hw0
There’s a nice tool for automatically determining what parts of your code are covered in Eclipse, called Eclemma. You can install it by following the instructions below:
Once Eclemma is installed, you can measure coverage by right-clicking on the name of your JUnit test class, then choosing “Coverage As” from the context menu, and then “JUnit Test.”
Once you run the tool, a new view should appear as a tree view. You can expand this view to review the Code Coverage score you got from running the test class.
For more help, feel free to check out the following tutorial videos!