Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 6c1a562f2c4626e993016964660cc64cda444b4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?xml version="1.0" encoding="UTF-8" ?> 
<cheatsheet title="Hello World Demo with Subitems">

	<intro 
		href="/org.eclipse.platform.doc.user/reference/ref-cheatsheets.htm">
		<description>
Welcome to the hello world cheat sheet.
This cheat sheet will help you to build the famous "hello world" application and try it out. You will create a java project, and a java class that will print "hello world" in the console when run.
Let's get started!
		</description>
</intro>

	<item
		href="/org.eclipse.platform.doc.user/concepts/concepts-4.htm"
		title="Open the Java Perspective">
		<description>
To begin, open the Java Perspective in the Eclipse workbench.  
You may do this by clicking window->open perspective->Java in the toolbar at the top of the 
workbench.  When you have done this, press the "click when done" button below.
		</description>
</item>

	<item
		title="Create java resources">
		<description>
The first thing you will need is a Java Project.
If you already have a java project in your workspace that you would like to use, you may skip this step by pressing the "skip" button.  If not, you may press the "click to perform" button to spawn the New Java Project wizard.
		</description>
		<subitem
			label="Create a java project"
			skip="true">
			<action
				pluginId="org.eclipse.ui.tests.cheatsheets"
				class="org.eclipse.ui.examples.cheatsheets.pattern.actions.OpenJavaProjectWizard"/>
		</subitem>
		<subitem
			label="Create your HelloWorld class">
			<action
				confirm="true"
				pluginId="org.eclipse.ui.tests.cheatsheets"
				class="org.eclipse.ui.examples.cheatsheets.pattern.actions.OpenJavaClassWizardWithMain"/>
		</subitem>
	</item>

	<item
		href="/org.eclipse.jdt.doc.user/tasks/tasks-54.htm"
		title="Add a System.out.println line in your main method">
		<description>
Now that you have your HelloWorld class,
In the "public static void main" method, add the following statement:  System.out.println("Hello world!"); and save your changes.  Press the "click when done" button below when finished.
		</description>
</item>

	<item
		href="/org.eclipse.jdt.doc.user/gettingStarted/qs-12.htm"
		title="Test your application">
		<description>
The final moment has arrived!  You are ready to test your HelloWorld class.
Select your class in the package explorer (the java tree view on the left of the workbench window in the Java Perspective.).  When your HelloWorld class is selected, press the down arrow beside the running man icon in the toolbar and select run as->application.  Hello world! should be printed in your "Console" view.  
Congratulations!  You have built your hello world application and it worked!
		</description>
</item>

</cheatsheet>

Back to the top