Contents Previous Next Index

Appendix   B

MIDlet Demonstration


The primary purpose of the J2ME Wireless Toolkit is to enable you to develop a MIDlet suite. You can also use it to demonstrate MIDlets for non-development purposes. You can use the J2ME Wireless Toolkit to demonstrate MIDlet suites that are deployed either on a web site or on a local disk without having to perform unnecessary development steps. You should be aware that by running an application in the Wireless Toolkit environment, you are running a simulation, meaning you do not have the full behavior of the Application Management System, such as domain checking and push registration for example.


Note – If you are not doing actual development with the J2ME Wireless Toolkit, and are only running demonstrations of your MIDlet suite, you are not required to have the J2SE SDK. You can run with only the JRE instead.

Demonstrating MIDlet Suites Deployed on a Local Disk

To demonstrate your application, double-click its JAD file. Alternately, you can use these steps:

  1. From the Windows Start menu, select Programs -> J2ME Wireless Toolkit 2.1 -> Run MIDP Application ...
  2. The Select A JAD File to Run dialog box appears.

  3. Select the JAD file of the application you want to run, and press Run.
  4. The Emulator appears.

Demonstrating MIDlet Suites Deployed on a Web Site

The J2ME Wireless Toolkit enables you to execute a MIDlet suite with the toolkit’s emulators by visiting the URL of the MIDlet suite’s JAD file in a Web browser. The MIDlet suite must be deployed on a Web server.

To deploy a MIDP application on a Web server:

  1. Change the JAD file’s MIDlet-Jar-URL property to the URL of the JAR file.
  2. This URL must be absolute. For example:

    
    MIDlet-Jar-URL: http://mumble.java.sun.com/midlets/example.jar 
    
    
  3. Ensure that the Web server recognizes JAD and JAR files:
    1. For the JAD file type, set the file extension to .jad and the MIME type to
      text/vnd.sun.j2me.app-descriptor.
    2. For the JAR file type, set the file extension to .jar and the MIME type to application/java-archive.

Note – The details of how to configure a Web server depend on the specific software used.

To run the MIDP application from the Web server:

 


Contents Previous Next Index User's Guide
Java™ 2 Platform, Micro Edition, Wireless Toolkit, Version 2.1