Development Environment for Java
Java Development Kit
Visit https://www.oracle.com/java/technologies/javase-downloads.html
Click “JDK Download” under the Oracle JDK Section
Download the appropriate installer
If running Windows 10, choose “Windows x64 Installer”
If running macOS, choose “macOS Installer”
In order to download the installer you must accept the “Oracle Technology Network License Agreement for Oracle Java SE”. You are supposed to read it, but you can just check the box and click the download button
Run the downloaded installer, leaving all options set to their default.
Eclipse IDE
Visit https://www.eclipse.org
Click the “Download” button on the top right
Click the Download button located beneath “Get Eclipse IDE”
Click the Download button
Run the Installer
Choose “Eclipse IDE for Java Developers”
(Recommended) Leave the location set to its default.
Click Install
You will get a popup for Unsigned Content. Check “Remember choice” and click “Accept”
Click “Open in System Explorer”
- If running Windows 10, create a shortcut to eclipse on your desktop if not already done
- If running macOS, you can move the Eclipse application to the /Applications folder on your mac (or wherever you want)
Setting Up Eclipse
- Run the Eclipse IDE
- Check the “Use this as the default and do not ask again” checkbox
Click Launch, noting the location of the workspace
eclipse-workspace
under your accountClick the “Create a Java project” link
Name your project “Test”
Click “Next”
Uncheck “Create module-info.java file”
- Click “Don’t Create”
Navigate to
File > New > Class
Enter a name for the class like
Hello
. It must always be UpperCamelCase (also called PascalCase)Check the “public static void main(String[] args) option under”Which method stubs would you like to create?"
Click Finish
Add a
println
statement to the main methodClick the Green “Play/Run” button
Video
Dr. Hogg has graciously recorded a video for getting started in Eclipse and Autolab. You can view the video by following this link: https://millersville.mediaspace.kaltura.com/media/Autolab-Introduction/1_lvc2fe9i