TOC PREV NEXT INDEX



Compiling the program


Looking back at the IDE, you should see the TipCalculator.Spotlet file in the 'Composer Files' group. Let's look at the code you just created.

  1. Choose the 'Java Source Files' group. You should see a new file called TipCalculator.java. This is the java code which has been generated by the Composer. (If you are using the trial version of Simplicity for Palm OS Platform, the composer will not create the Java source file. Use Finished.java instead for the rest of the tutorial.)
  2. Double-click the TipCalculator.java icon. This opens Simplicity's Java Source Editor with the TipCalculator.java file loaded. Browse through the code. You will see the code which you generated using the Code Sourcerer, in addition to code which Simplicity generated to set up the Spotlet.
  3. Exit the Java Editor. (Don't save any changes to the file just yet.)

Now we want to compile and test the program inside the Emulator.

  1. You want to bring up the pop-up menu for the TextEditor.java icon. This is usually done by clicking the right mouse button on the icon, but this behavior varies on different operating systems. You can also show the pop-up menu by holding the shift key and clicking the icon with the mouse.
  2. Choose 'Compile' from the pop-up menu. Simplicity for Palm OS Platform now invokes your Java compiler to turn the Java source code which you just created into an executable file, called a Java class file. If you have not already run the J2ME Install Wizard, it will open now and help you to download the necessary files in the CLDC. The J2ME Install Wizard will also place the files in the proper place in your Simplicity install directory.
  3. In the Project Tree, choose 'Java Class Files'. You should see an icon named TipCalculator.class. This file is your executable program.
  4. Double click TipCalculator.class. The Class Viewer appears. The Class Viewer can provide a variety of information about the contents of a class file.
  5. At the bottom of the Class Viewer is a large button labelled Run. Press this button to run the application.

Data Representations, Inc.
http://www.datarepresentations.com
support@datarepresentations.com
sales@datarepresentations.com
TOC PREV NEXT INDEX