Video: Creating a Hello World Java application

The following transcript is for the Creating a Hello World Java application video, which describes how to create a Java application that displays the Hello World string by using WebSphere Developer Tools Version 8.5.5 and later. This transcript is the video storyboard. Audio describes narration and captions. Onscreen Action describes the content shown in the video.

Table 1. Creating a Java application. Show the Hello World video recording of WebSphere Developer Tools and describe the steps in the narration.
Scene Audio Onscreen Action
1 This tutorial shows you how to create a Java project, a package, and source files for a Hello World application. Show title, Creating a Hello World Java application while showing WebSphere Developer Tools after starting the product for the first time.
2 To begin, select File > New > Project to open the New Project wizard. Show the cursor select File > New > Project.
3 In the New Project wizard, select Java Project > Next to make a Java project. Show the cursor select Java Project > Next in the New Project wizard.
4 Give the project a name. For Project Name, type MyJavaProject and select Finish. Show MyJavaProject typed for Project Name and then the cursor select Finish in the New Project wizard.
5 If prompted, select Yes to open the Java perspective. Show the cursor select Yes in the Open Associated Perspective? dialog.
6 The contents of the Java project are shown in the Package Explorer view. Show the cursor, in Package navigation tree, expand My Java Project to see src and JRE System Library [jdk] directories.
7 Now that you have a Java project, create a Java package. Select New > Package. Show the cursor select New > Package to open the New Java Package wizard.
8 In the New Java Package wizard, type myPackage for Name and select Finish. Show myPackage typed for Name and then the cursor select Finish in the New Java Package wizard.
9 Next, create a Java class named HelloWorld. Select New > Class. Show the cursor select New > Class to open the New Java Class wizard.
10 In the New Java Class wizard, type HelloWorld for Name and select Finish. Show HelloWorld typed for Name and then the cursor select Finish in the New Java Class wizard.
11 A new file, HelloWorld.java, opens in the Java editor. Show HelloWorld.java in Java editor with class definition:
package myPackage;

public class HelloWorld {

}
12 Add code that will display the words Hello World. Notice that when you start adding the code, a red marker displays in the margin next to the first word, public. Place your cursor over the marker to read the error messages. Show public typed in the HelloWorld class, the cursor hover over the red marker, and then the message:
Multiple markers at this line
 - Syntax error, insert "enum identifier" to complete EnumHeader
 - Syntax error, insert "EnumBody" to complete ClassBodyDeclarations
13 The code to add is a main method that prints out a string of characters, Hello World.

The editor provides content assistance for known Java structures. Double-click a structure to add it.

Show the beginning of the main method typed into the editor:
public static void main(String[] args) {
  System.
}
A red line underlines System. and a list displays. The cursor double-clicks on
out - PrintStream - System
14 Select an available Java structure to see its description. Show cursor click on println in a list to display its description and then double-click on println to add it to the code.
15 The body of the main method has:
System.out.println("Hello World");
Show ("Hello World"); typed, so resulting code is:
public static void main(String[] args) {
  System.out.println("Hello World");
}
Table 2. Test the Java application. Show how to run the Java application and display Hello World in the tool.
Scene Audio Onscreen Action
16 Save your work. Select File > Save. Show the cursor select File > Save.
17 To test the Java application, right-click My Java Project, and select Run As > Java Application. Show the cursor right-click My Java Project, and then select Run As > Java Application.
18 Hello World is now displaying. Show the tool displaying the words Hello World in the console.
Table 3. Conclusion. Summarize how to make a Java application.
Scene Audio Onscreen Action
19 You now know how to add a Java project, a Java package, and a Java class to make a Java application. The product has wizards and editor features like content assist to help you make Java applications. Show the WebSphere Developer Tools product.