Saturday, November 15, 2014

Getting Started With Java's Hello World: Part III

Install Eclipse

This post is continued from Getting Started with Java's Hello World: Part II. In this section, we will install Eclipse 4. Eclipse is typically used to change Java programs. I googled "install eclipse on windows", clicked on Eclipse Downloads (Eclipse), in the Eclipse Standard 4.3 section, clicked on Windows 32 Bit, clicked on Columbia University (Mirror).
  1. Download the zip file to your Desktop.
  2. Extract the file to "C:\".
This created "C:\eclipse".

Add Hello World Code to my-app Project in Eclipse

  1. Open Eclipse
    • To open Eclipse, double click on "C:\eclipse\eclipse.exe"
    • You may also type this at a command prompt or create shortcuts to your Desktop/Taskbar.
  2. Choose a workspace (ie "C:\Users\Scott\workspace")
  3. Right click in the Project Explorer Window->Import->General->Existing Projects Into Workspace->Browse for the my-app project (ie "C:\Users\Scott\workspace\my-app")
    • Under the my-app folder you should see the "src/test/java" and "src/main/java" folders.
    • You should also be able to find App.java and AppTest.java which contain the source and test code, respectively.
  4. Right click on App.java->Run As->Java Application->Proceed
    • Go to the Console Tab
    • You should see "Hello World!"
Note: You may edit the App.java file within Eclipse to change the output.

This post was reposted from http://scottizu.wordpress.com/2013/08/14/getting-started-with-javas-hello-world-part-iigetting-started-with-javas-hello-world-part-iii/, originally written on August 14th, 2013.

No comments:

Post a Comment