Hello World

This tutorial will help you create the infamous Hello World app.

wpeD.jpg (10439 bytes)

I have attached a copy of the java and the class file.

HelloWorld.java

HelloWorld.class

To begin, you will need to install the latest JDK. You can find the latest version at java.sun.com. (I am using JDK 1.3.1_03.)

After install is complete reboot your system.

Create a folder in your c:\jdk1.3.1_03 folder called source.  (This is where you will keep all your .java files)

Create a folder in your c:\jdk1.3.1_03 folder called classes.  (This is where you will keep all your compiles .class files)

Open notepad.

Enter the following

import java.io.PrintStream;

class HelloWorld

{

HelloWorld()

{

}

public static void main(String args[])

{

System.out.println("Hello World!");

}

}

 

Save this file as HelloWorldApp.java in the c:\jdk1.3.1_03\source folder.  (Make sure it didn't get called HelloWorldApp.java.txt)

Open a command prompt and type the following lines hitting enter after each line.

path = c:\jdk1.3.1_03\bin

cd \

cd jdk1.3.1_03\source

javac -d c:\jdk1.3.1_03\classes HelloWorld.java

Hit Enter.

wpeA.jpg (20257 bytes)

If compiling is successfull the command line will return without any errors like above.

Next, type the following line.

cd ..

cd classes

java HelloWorld

wpeB.jpg (17132 bytes)

If successfull you will see Hello World!.

 

Transferring Hello World to the Zaurus

Next, using windows explorer, open the c:\jdk1.3.1_03\classes folder and copy the file into you documents view of you Qtopia desktop for upload to the Sharp.  Click the Sync All button.

If prompted for a location select Internal Storage.  (You will only be prompted if you have added a CF, SD, or MMC card.)

hello_6.jpg (8383 bytes)

On the Zaurus open a Termal shell on the Zaurus.

hello_7.jpg (20480 bytes)

Enter the following.

cd Documents/application/octet-stream

evm HelloWorld

Then hit the return key hello_8.jpg (825 bytes)

If successful you should see the following.

wpeD.jpg (10439 bytes)