C209 Java Eclipse Guide
C209 Java Eclipse Guide
C209 Java Eclipse Guide
2. Download (Not necessary if you already have the above software from a thumb drive
Get both Java and the Eclipse here: http://bit.ly/2021c209 (if Ctrl-Click does not work, try
copying and pasting the link).
Java SE 15
https://www.oracle.com/sg/java/technologies/javase-jdk15-downloads.html
Eclipse 2020-12
https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/
release/2020-12/R/eclipse-java-2020-12-R-win32-x86_64.zip
Page 1
OFFICIAL (CLOSED) \ NON-SENSITIVE
Pre-installation Tasks
3. To ensure a smooth and successful installation operation, it is strongly recommended that you
perform the following housekeeping tasks first:
ii. Note your Eclipse workspace directory, which will likely be different from the
following example:
iii. Open Windows Explorer and navigate to the Eclipse workspace directory. Create a zip
file of that directory:
Page 2
OFFICIAL (CLOSED) \ NON-SENSITIVE
iv. Save the zip file in a secure location as a backup copy of your work.
ii. Note the Eclipse directory, which will likely be different from the following example:
Page 3
OFFICIAL (CLOSED) \ NON-SENSITIVE
iii. In the Apps & Features option windows, look for ALL Java installations and uninstall.
Page 4
OFFICIAL (CLOSED) \ NON-SENSITIVE
Installing Java
4. To install Java SE Development Kit, double click on the file jdk-15.0.2_windows-x64_bin.exe
Follow the steps listed below.
5. Click [Next]
Page 5
OFFICIAL (CLOSED) \ NON-SENSITIVE
Installing Eclipse
7. Double-click on eclipse-java-2020-12-R-win32-x86_64.zip
Page 6
OFFICIAL (CLOSED) \ NON-SENSITIVE
10. After pasting, your directory structure should look similar to the below.
12. You will be asked to select a workspace. This will be the folder which Eclipse stores all your
codes.
Chose a meaningful folder. E.g. C:\RP\C209\workspace. Ensure that your workspace folder
should NOT be in the eclipse program folder in Step 10. You can change the location of this
workspace whenever you want. Click on the checkbox Use this as the default.
Page 7
OFFICIAL (CLOSED) \ NON-SENSITIVE
13. After Eclipse has started, right-click on the Eclipse’s icon at the taskbar and click Pin this program
to taskbar.
15. Dismiss the Welcome Window by clicking on the [X] on the Welcome Tab as circled above. You
can bring back the Welcome Window by clicking Help Welcome.
Page 8
OFFICIAL (CLOSED) \ NON-SENSITIVE
Configuring Eclipse
17. Click Window Preferences. Type “font” in the text box. The following dialog will appear.
18. Select Colors and Fonts. Select Basic, then scroll down to select Text Font. Click the [Edit…]
button. Change the font to Consolas 10. Click [Apply and Close].
20. Ensure that your compiler compliance level is 15. Click [Apply and Close].
Page 9
OFFICIAL (CLOSED) \ NON-SENSITIVE
Page 10
OFFICIAL (CLOSED) \ NON-SENSITIVE
22. Click [Finish]. When prompted to create module-info.java, select [Don’t Create].
23. You will be able to see the newly created project in the Package Explorer as illustrated.
25. In the Name, key in HelloWorld, ensure that “public static void main(String[] args)” is checked.
Click [Finish].
Page 11
OFFICIAL (CLOSED) \ NON-SENSITIVE
26. Expand the src folder and you should see the file HelloWorld.java created there.
27. Move the mouse pointer to the margin of the editor window and right-click to bring up the pop-
up menu. Select Show Line Numbers.
Page 12
OFFICIAL (CLOSED) \ NON-SENSITIVE
28. Enter the following codes at Line 6 and press [Ctrl]+S to save the codes.
Page 13
OFFICIAL (CLOSED) \ NON-SENSITIVE
Using Windows Search, click on the magnifying glass icon, then key in Advanced Keyboard Settings:
In the Advanced keyboard settings window, click on Input language hot keys:
Page 14
OFFICIAL (CLOSED) \ NON-SENSITIVE
Select any Ctrl+Space key sequence and click [Change Key Sequence…]:
Page 15
OFFICIAL (CLOSED) \ NON-SENSITIVE
Change Ctrl+Space to Left Alt + Shift. Click [OK] and click [OK] again.
Page 16