Explore the sample
Configuring this project takes approximately 2 minutes.
- Before you can run the sample, you must first import it into
your workspace:
- Import
the sample.
- In the Hello World dialog box, the Project
Name is filled in for you. Accept that default and click Finish.
If asked to switch to the Java Perspective, click Yes.
- To view the output of the HelloWorld.java
code, you need to add the Console view which is not displayed by
default in the Java perspective. To add this view:
- From the Window menu, select Show View.
- Select Console. The Console view now displays at the
bottom of your workbench.
- The following steps show you how to configure and run the
sample:
- Expand the SimpleHelloWorld project in the
Project Explorer view and then expand the com.ibm.sample.java.helloWorld
directory.
- Double-click on HelloWorld.java to view the code.
- To run the program, click on Run > Run...
from the main menu bar.
- In the Configurations list, select Java
Application and click New.
- Accept the defaults and click Run. The
phrase "Hello world" displays in the Console.