PersonalJava Tutorial

Not quite what I usually post and oddly specific, here is a PersonalJava tutorial to help people getting started with developing Java applications for old Handhelds.

What do you do when you want to create applications for Handheld PCs? There is a variety of options including the Windows CE SDK, Visual Basic, PocketC and others. Usually they require an understanding of the Windows CE API. There is another, often overlooked piece of software that is PersonalJava, an almost full implementation of the Java 1.1.8 standard for Windows CE 2.11 and 3.0, released by Sun in 1999.
The purpose of this article is to show how easy it is to develop Java applications for your Handheld.

What you need:

Get started by creating a new project in Eclipse.

Select JRE-1.1
Select JRE-1.1

Now we need the archive with the PersonalJava classes. While you could also use the library of the JRE you’re using, Eclipse won’t tell you which classes are not available in Java 1.1, so using the actual library makes it much easier.

Locate the file on your Handheld PC after installing PersonalJava, create a /lib/ folder in your Java project and copy the zip there.

Should look like this
Should look like this

Right-click on your Project, click Properties and navigate to Java Build Path – Libraries. First, remove the rt.jar as we won’t need it. Then click “Add JARs” and add

Remove rt.jar, add
Remove rt.jar, add

Now, what is missing is the JavaDoc which helps a lot with developing. Eclipse automatically integrates the JavaDoc into the user interface, but requires the doc to use a specific formatting standard. A workaround is using a JavaDoc from a newer version of Java, which might include some wrong information about deprecated methods, but – since Java is backwards-compatible – should include all the information you need.
To do this, right click on “” in your Referenced Libraries project folder, click Properties, and under JavaDoc location, point it to the folder that contains the JavaDoc (I used as 1.3 seems to be the first version to have a format that works with Eclipse)

Create a new Class and call it, then our project is all set up now and we’re ready to start coding!

The project structure
The project structure

Here is a short example code:

import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.Label;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
class HelloWorld extends Frame {

private static final long serialVersionUID = 1L;
          super("Hello World");
          setLayout(new BorderLayout());
          add(new Label("Wow!"), "Center");
          setSize(320, 200);
          addWindowListener(new WindowAdapter() {
               public void windowClosing(WindowEvent windowevent) {
     public static void main(String args[]) {
          new HelloWorld();

To compile and run the application, navigate to Run – Run configurations, double click “Java Application” and click Run.

Run it!
Run it!

Here’s how it looks on Windows 7:

Hello World!
Hello World!

To run it on your HPC, simply copy all class files from the /bin/ folder of your project to your HPC, then start HelloWorld.class

Java application running on a HP Jornada 820
Running on a HP Jornada 820

Happy coding!

2 thoughts on “PersonalJava Tutorial”

  1. Daftar Situs Judi Online Terbaik in Indonesia
    Situsalternatif are the collection of provides of the best online gambling sites from all recognized bookies / agents in Indonesia.
    Information on online gambling internet sites listed on this specific
    page is obviously altering, because we simply provide sites that will get good reviews.
    Each site provides some informative concerning the games
    available, deposit transaction alternatives, and alternative

    Collection of Situs Alternatif and Daftar Judi Online Terbaik
    Playing on gambling internet sites is not really completely clean, one of many problems often experienced by
    players will be difficulty accessing the site where to enjoy
    due to site blocking. Therefore, the Alternative Site collects alternate links here which often are incredibly useful to help gamblers to be able to easily login in addition to daftar taruhan online.

    Within addition, you may need to worry about the link jalan keluar judi that all of us provide, needless to say you
    can access that easily and for free.

Leave a Reply

Your email address will not be published. Required fields are marked *