LAB EXERCISE 2:  Installing Eclipse and Creating Your First Java Program

A.      Install the Eclipse IDE for Java Developers
 NOTE:  If the Eclipse has been installed on the PC, proceed to Step B

https://eclipse.org/downloads/eclipse-packages/



You can also download from my website the Eclipse IDE for Windows10 64bit

eclipse-java-2020-06-R-win32-x86_64.zip

B.  Create a folder on your desktop called Exercise-02

C.  Launch Eclipse and Setup the Workspace.

1. Double click on the Eclipse icon

2. Select your Exercise-02 folder as your Workspace.
NOTE: You will need to click on the Browse button to locate the folder you created on the desktop.

3. Click the Workbench.

4. Select Window-> Perspective->Open Perspective->Java
NOTE: If you installed Eclipse JEE Neon, the Workbench will open to Java EE window. You will need to change the Workbench to Java Workbench.

 

5. Select Window-> Show View -> Project Explorer
NOTE: This View will allow you to view the Java Projects you are working on.

 

6. In Text Editor window, activate the show line numbers the EclipseText Editor.
a. Select Windows-> Preferences
b. Expand General folder and then Editors
c. Select Text Editors.
d. Click on Show line numbers and then click OK

e. Close the Preferences dialog box.

 

 

D. Create your first Java Program

1.  Select File->New->Java Project

2. Type the HelloWorld has the Java project name

3. Click on Finish

 

4. a. Expand the HelloWorld folder 
    b.
Right click on the scr folder.
    c. Select
New-> Class



5. a. Type HelloWorld as the Java Class name
    b. Click on the check box “
public static void main (String [ ] args)
    c. Click on Finish

 

6. In the HelloWorld.java text editor window, type the following code circled in red.
System.out.println("Hello World. This is my first Java Program");

 

7. Run your Java Program. Click on the Run button.

8. Save and Launch by clicking on the OK button.

 

9. Verify in the Console window at the bottom screen that your code executed.

 

E.  Submit your exercise in Canvas Lab Exercise #2 Drop Box.

1. Submit the screen shot of the Eclipse Workbench window showing the Console output screen (see step D9#). 
NOTE: You can use Paint (save as JPG) or Word to paste the screenshot.

2.  Zip up and submit the compressed your Exercise-02 folder.
NOTE: Right click on the
folder and select “Send to Compress Folder”.  The file will have a file extension of .zip