Environment Setup on Your Own Computer

These instructions and screenshots are based on a Windows platform, but the steps are essentially the same on Mac OS X and Linux.

Important: follow these instructions carefully, and do not skip any steps! Type all inputs exactly as provided, including spelling and capitalization.

Download CSE 2221/2231-Specific Files

  1. Download components.jar, and move it to an easily accessible location that you can remember (e.g., Documents).

  2. Download OsuCseWsTemplate.zip, and expand (uncompress, unzip) it. Move the one folder it contains, workspace, to an easily accessible location that you can remember (e.g., Documents). You will store all your Eclipse projects for this course in this workspace folder.

Install Eclipse

  1. Download the Eclipse Installer for your operating system (Windows, Mac, or Linux) and architecture (x86_64 or AArch64). To check your architecture on Windows, open Settings > System > About: A "System type" of "x64-based" means x86_64, while "ARM-based" means AArch64. On a Mac, click on the Apple menu > About This Mac: a chip or processor with "Intel" means x86_64, while "Apple Mx" chip means AArch64.

  2. Run the installer, and make the following selections:

    1. Install Eclipse IDE for Java Developers.

      Thumbnail for newhome-eclipse01-java.png Install New Software dialog showing Add button and repository list

    2. For Java 21+ VM, use JRE 21. Click Install, and accept the license agreement.

      Thumbnail for newhome-eclipse02-jre.png Install New Software dialog showing Add button and repository list

    3. Once installation is complete, click Launch.

      Thumbnail for newhome-eclipse03-launch.png Installation window showing Launch button

  3. When prompted to Select a directory as workspace, you must change the entry to be the location of the workspace folder that you created from OsuCseWsTemplate.zip. Use the Browse... button to navigate to the correct location (e.g., Documents), select the workspace folder, and click Select Folder. The path will be something like C:\Users\your-username\Documents\workspace. Optionally, you can select Use this as the default and do not ask again. Click Launch.

    Thumbnail for newhome-eclipse04-select-workspace.png Workspace selection dialog

  4. The first time Eclipse starts, you will see a warning that the "IDE is missing natures to propertly support projects". This is expected since we have not yet installed the required plugins. Click Cancel to dismiss this dialog.

    Thumbnail for newhome-eclipse05-missing-natures.png Eclipse dialog indicating the IDE is missing natures to properly support projects

  5. Depending on your security and anti-virus settings, you may see a warning about running Eclipse. If so, allow Eclipse to run.

    Thumbnail for newhome-eclipse06-defender.png Eclipse dialog indicating that Windows Defender will slow down launch

Confirm the Workspace

When Eclipse starts, confirm that you have opened the correct workspace. There should be a single project, named ProjectTemplate, in the Package Explorer tab on the left of the window. This project has a red exclamation mark icon indicating that there are some issues to be resolved, which is normal at this point since the setup is not complete.

Thumbnail for newhome-eclipse07-confirm-workspace.png Eclipse workspace selection dialog showing a Workspace text field containing a file path, a checkbox labeled Use this as the default and do not ask again, and OK and Cancel buttons; underlying Eclipse IDE window visible in the background

If the workspace does not contain the ProjectTemplate project, switch to the correct one using File > Switch Workspace > Other... then navigate to the correct workspace folder on your disk.

Thumbnail for newhome-eclipse04-select-workspace.png Eclipse workspace selection dialog showing a Workspace text field containing a file path, a checkbox labeled Use this as the default and do not ask again, and OK and Cancel buttons; underlying Eclipse IDE window visible in the background

Do not proceed until you are sure you have opened the correct workspace.

Install Required Plugins

The functionality of the Eclipse IDE can be expanded by adding extensions known as plugins. Our development environment uses four such extensions: Checkstyle, SpotBugs, Subclipse, and Eclipse Web Developer Tools. Start Eclipse and make sure you are in the correct workspace.

  1. Install Checkstyle.

    1. Use Help > Eclipse Marketplace... to open the marketplace.

      Thumbnail for newhome-plugin01-marketplace.png Eclipse Marketplace dialog showing search box and results

    2. In the Search tab, type "checkstyle" in the Find box and hit Enter. In the search results, find the Checkstyle Plugin (eclipse-cs) and click Install.

      Thumbnail for newhome-plugin02-checkstyle.png Eclipse Marketplace dialog showing Checkstyle plugin ready to install

    3. Accept the license agreement (if any) and click Finish.

      Thumbnail for newhome-plugin03-license.png Eclipse Marketplace dialog showing license agreement for Checkstyle plugin

    4. If you are asked to trust authorities, click Select All, then Trust Selected.

      Thumbnail for newhome-plugin04-trust-authority.png Eclipse Marketplace dialog showing trust authorities for Checkstyle plugin

    5. If you are asked to trust artifacts, click Select All, then Trust Selected.

      Thumbnail for newhome-plugin05-trust-artifacts.png Eclipse Marketplace dialog showing trust artifacts for Checkstyle plugin

    6. Once the installation of the Checkstyle plugin is complete, Eclipse offers to restart. Since you need to install a few more plugins, click No.

      Thumbnail for newhome-plugin06-restart.png Plugin installation complete dialog prompting whether to restart Eclipse

  2. Install SpotBugs.

    1. Use Help > Eclipse Marketplace..., and search for "spotbugs". Find the SpotBugs Eclipse Plugin and click Install.

      Thumbnail for newhome-plugin07-spotbugs.png Eclipse Marketplace dialog showing SpotBugs plugin ready to install

    2. Again accept the license agreement (if any) and click Finish. Trust all authorities and artifacts as before.

    3. Click No when Eclipse offers to restart.

  3. Install Subclipse.

    1. Use Help > Eclipse Marketplace..., and search for "subclipse". Find the Subclipse plugin and click Install.

      Thumbnail for newhome-plugin08-subclipse.png Eclipse Marketplace dialog showing Subclipse plugin ready to install

    2. Select only the following features: Subclipse (required) and SVNKit Client Adapter. The dialog should look like the screenshot below. Then click Confirm.

      Thumbnail for newhome-plugin09-subclipse-features.png Eclipse Marketplace dialog showing Subclipse plugin features to install

    3. Again accept the license agreement (if any) and click Finish. Trust all authorities and artifacts as before.

    4. Click No when Eclipse offers to restart.

  4. Install Eclipse Web Developer Tools.

    1. Use Help > Eclipse Marketplace..., and search for "web developer". Find the Eclipse Web Developer Tools plugin (not the one labelled Enterprise Edition) and click Install.

      Thumbnail for newhome-plugin10-wdt.png Eclipse Marketplace dialog showing Eclipse Web Developer Tools plugin ready to install

    2. Select only the required features, which are the first four entries in the list. The dialog should look like the screenshot below. Then click Confirm.

      Thumbnail for newhome-plugin11-wdt-features.png Eclipse Marketplace dialog showing Eclipse Web Developer Tools plugin features to install

    3. Again accept the license agreement (if any) and click Finish. This time there are no dialogs needed to trust authority or trust artifacts.

    4. Accept the offer to restart Eclipse by clicking Restart Now.

      Thumbnail for newhome-plugin12-restart-yes.png Plugin installation complete dialog prompting whether to restart Eclipse

Configure Preferences

Start Eclipse and make sure you are in the correct workspace. Open Eclipse preferences by selecting Window > Preferences. (On Mac OS X, use Eclipse > Settings...).

  1. Configure the JRE.

    1. Expand and select Java > Installed JREs. In the list of installed JREs, click on jre (default) (the one with the checkmark), and then Edit.... Note: the Edit button is greyed out until you click on one of the entries in the list.

      Thumbnail for newhome-pref01-installed-jre.png Eclipse Preferences dialog showing Java Installed JREs selected in the left-hand tree

    2. For Default VM Arguments, enter -enableassertions (or simply -ea). Click Finish.

      Thumbnail for newhome-pref02-vm-args.png Edit JRE dialog with -enableassertions (-ea) entered in Default VM Arguments field

    3. Click Apply (not Apply and Close).

  2. Add the component library to the build path.

    1. Expand and select Java > Build Path > Classpath Variables. Select the OSU_CSE_LIBRARY entry and click on Edit...

      Thumbnail for newhome-pref03-classpath.png Thumbnail of Build Path Classpath Variables dialog

    2. Set the Path to the location of the components.jar file, either by typing it in or by clicking on File... and navigating to the appropriate location. Click OK.

      Thumbnail for newhome-pref04-componentsjar.png Thumbnail showing components.jar path set in dialog

    3. Click Apply and Close and when asked whether you want to do a full build now, click Yes.

      Thumbnail for newhome-pref05-classpath-apply.png Thumbnail of Build Path Classpath Variables dialog

If you followed all the steps above correctly, there should be no errors or warnings in the given ProjectTemplate.