HelloWorld

Work on this exercise by yourself, but ask questions of your instructor, student assistants and classmates as desired.

Goals

The goals of this exercise are to:

The Exercise

You will design, implement and test the famous HelloWorld program.

You will add the HelloWorld project to a central repository using Subclipse.

This is an exercise that screams for questions -- ask them when they arise!!!

Instructions Part 0 - Install Subclipse

Install Subclipse, if you haven't, by following the instructions at

	http://www.rose-hulman.edu/class/csse/resources/Subclipse/installation.htm

Instructions Part 1 - Create the Project

  1. Open Eclipse, and make sure the Package Explorer is visible in the left window.
  2. From the menus, select File → New → Project. This will bring up the New Project Wizard.
  3. Accept the default choice, Java Project and choose Next.
  4. Name your project HelloWorld (no spaces, capitalized just as written). Accept the defaults, but notice that you are choosing to Create a New Project in Workspace.
  5. Choose Next, and notice the folders (src and bin) that Eclipse is about to create for you
  6. Choose Finish and you should be back at the Package Explorer.
Before you continue, minimize Eclipse and go find the folders for HelloWorld, bin and src. Unless you redirect your project workspace output, from now on all your projects will be created here.

Instructions Part 2 - Write and Execute the Code

  1. Write the code for HelloWorld....
  2. Make sure it runs as a proper dignified HelloWorld program should, with output on the console - no GUIs. To run, select in the Package Explorer the .java file containing main(), right-click, and choose Run as → Java application. (Or, find the Run button on the toolbar.)
  3. After making it print Hello, world (or something like that) once, write a loop to make it print Hello, world 300 times.
  4. Fill in the Javadoc comments appropriately. Then choose Project → Generate Javadoc... to generate the HTML Javadoc comments. Examine the comments -- pretty cool, yes?

 

Instructions Part 3 - Add the Project to Version Control

  1. Right click on the HelloWorld project in Package Explorer, and choose Team → Share Project
  2. Select SVN (not CVS -- Eclipse supports both version control systems, but SVN is the more modern one) and select Next
  3. Select Create New Repository Location and select Next
  4. Type as the URL
    	http://svn.csse.rose-hulman.edu/repos/csse221-201210-YOUR_USERNAME
    
    where you replace YOUR_USERNAME by your Kerberos (and Subversion) username. Then choose Next.
  5. Accept the default to Use project name as folder name, and select Next.
  6. Include a useful comment that describes the current state of your HelloWorld project. If it's done, say so. This is important for later on!!!!
  7. After you choose Finish you should see log file notes in the Eclipse console window that verify your success. Now it has committed the project, but not your file.
  8. If it asks you about the Synchronize view, select Remember my decision and No.
  9. Now right-click on your HelloWorld project again, and choose Team → Commit to commit your files to the repository.
  10. Minimize or exit Eclipse and go look for your HelloWorld folder. Something is very different - a Green Check mark is on the folder, indicating that the folder and its contents are now part of the version control system.
From now on, when you want to modify this project, you will need to update your local copy first, in case anyone else has worked on the project. Then, after you make your changes, you will commit your changes back to the repository so other people can see them.