Sun J2ME Wireless Toolkit

 
 
The Sun J2ME Wireless Toolkit supports the development of Java applications that run on devices such as cellular phones, two-way pagers, and palmtops.

More information about the Sun J2ME Wireless Toolkit can be found at: http://java.sun.com/products/j2mewtoolkit/

rss feed






Setup, build and run teapot5_box.m3g on Sun J2ME Wireless Toolkit 2.2.



Information
Operating system used
Windows XP Home Edition Version 5.1 SP 2

Software prerequisites
Sun J2ME Wireless Toolkit 2.2


Procedure
  1. Start "KToolbar".

    Sun J2ME Wireless Toolkit 2.2 (KToolbar)

  2. Create a new project, press button "New Project".

  3. Enter the following project details:

    Project Name: Teapot5M3G
    MIDlet Class Name: com.mobilefish.m3g.Teapot5MIDlet

    Enter project details

    Press button "Create Project".

  4. Change the settings for this project:

    Tab: API Selection

    Target Platform: JTWI
    Configurations: CLDC 1.1
    Additional APIs: Mobile 3D Graphics for J2ME (JSR 184)

    Project setting: tab API selection.

    Tab: Required

    MIDlet-Vendor: Mobilefish.com (or choose any name you want).

    Project setting: tab Required.

    Tab: Optional

    MIDlet-Description: Teapot With Box Demo
    MIDlet-Info-URL: http://www.mobilefish.com

    Project setting: tab Optional.

    Tab: User Defined

    no change

    Tab: MIDlets

    Icon: /icons/teapot.png

    Note: The image size is 12x12 px. The image looks like this: teapot 12x12 png file.

    Project setting: tab MIDlets.

    Tab: Push Registry

    no change

    Tab: Permissions

    no change



  5. Press OK button. The project is created.

    Project created.

  6. Close KToolbar, menu: File | Exit.

  7. You must manually create the icons directory: C:\Tools\WTK22\apps\Teapot5M3G\res\icons

  8. Download the following 4 files:
  9. The downloaded files must be copied to the following toolkit directories:

    • Copy Teapot5MIDlet.java and Teapot5Canvas.java into C:\Tools\WTK22\apps\Teapot5M3G\src\com\mobilefish\m3g

    • Copy teapot5_box.m3g into C:\Tools\WTK22\apps\Teapot5M3G\res

    • Copy teapot.png into C:\Tools\WTK22\apps\Teapot5M3G\res\icons

  10. Start KToolbar and press button "Open Project".

    Open project.

  11. Select project "Teapot5M3G" and press button "Open Project".

    Project selected.

  12. Select the Device. In this example the default device "DefaultColorPhone" is used.

  13. Press button "Build" and if no errors are shown, press button "Run".

    M3G teapot

    Use the forward, back, left and right button to move the camera.

    M3G teapot moved

  14. Close KToolbar, menu: File | Exit

  15. To create an obfuscated package, you need the proguard.jar file.
    To get it do the following:

    • Go to http://proguard.sourceforge.net
    • Select the "Download" link.
    • Select "Download section".
    • Choose the latest version of proguard.zip and save it to yours disk.
    • Extract the proguard.jar file from proguard.zip into the bin subdirectory of the WTK.

  16. Start KToolbar and open project Teapot4M3G.

  17. Now you can create an obfuscated package.
    Select menu: Project | Package | Create Obfuscated Package.

    Create obfuscated package

  18. During build the following messages are displayed:

    Create obfuscated package messages

  19. The Teapot4M3G.jar and Teapot4M3G.jad can be found in C:\Tools\WTK22\apps\Teapot4M3G\bin