Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Open eclipse and select your workspace. If you start out with a blue screen with some circular buttons saying Welcome, Tutorial, etc., click Go to Workbench. Otherwise, you are already at the workbench. Go to File → New → Java Project. Name your project sandbox, then click the button Finish. You now have a new project!

In the Package Explorer (left side) right click the arrow next to sandbox to expand the project. Right click on the src folder and then go to new -> class. Name the class

Code Block
TestClass

. Under "Which method stubs would you like to create?" check the box next to

Code Block
public static void main(String[] args)

. Hit the "Finish" button. Then replace

Code Block
// TODO Auto-generated method stub

...

Save the file TestClass.java by hitting Ctrl+s or the save button (top left on the menu bar). To run your code, go to the top center of the menu bar and hit the run icon (its a green circle with a white arrow inside), or go to the menu bar and hit Run ->Run→ Run. The Console should pop up on the bottom with the output of your program.

...