Sun Microsystems J2ME User Manual Page 29

  • Download
  • Add to my manuals
  • Print
  • Page
    / 134
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 28
Chapter 2 Developing MIDlet Suites 17
2.5 Using a Debugger
A variation on running your application is running it with a debugger. A debugger
allows you to monitor the running application more closely, set breakpoints, and
examine variables.
You will need to supply your own debugger. You can use the jdb debugger from
J2SE™ or another debugger of your choice.
Begin by choosing Project > Debug from the KToolbar menu. Enter the TCP/IP
port number that the debugger will use to connect to the emulator. Click on
Debug. The emulator begins running and waits for a connection from a debugger.
Start up your debugger and attach it to the port you specified. Make sure to set the
remote debugger to run in remote mode and to use TCP/IP. For more information,
consult the debugger’s documentation.
Information about using jdb with the J2ME Wireless Toolkit is here:
Debugging MIDlets
http://developers.sun.com/techtopics/mobility/midp/questions/
jdb/
2.6 Deploying Applications on a Web
Server
The MIDP 2.0 specification includes the Over The Air User Initiated Provisioning
Specification, which describes how MIDlet suites can be transferred over-the-air
(OTA) to a device. You can test this type of scenario using the J2ME Wireless
Toolkit emulator.
To deploy a packaged MIDP application remotely on a Web server:
1. Change the JAD file’s MIDlet-Jar-URL property to the URL of the JAR file. The
URL should be an absolute path. For example:
MIDlet-Jar-URL: http://your.server.com/midlets/example.jar
2. Ensure that the Web server uses the correct MIME types for JAD and JAR files:
a. For MIDlet suite descriptors, map the .jad extension to the text/
vnd.sun.j2me.app-descriptor MIME type.
b. For MIDlet suite JARs, map the .jar extension to the application/java-
archive MIME type.
Page view 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34 ... 133 134

Comments to this Manuals

No comments