Jade - Doja execution environment for j2se

[ download page ] [ configuration info ]

Primary objective of the Jade is to run your code written for j2me Doja api on the pc utilizing the j2se environment.

Someone might call such application an "emulator" but in this case all the code is run on the common java virtual machine and there is no real emulation involved, however the results are similar.

Why I made the Jade when there are some emulators developed by the device vendors? The short answer is that they have many limitations, and some of them doesn't work on my computer. Pstros tries to be as fast as possible and brings you the comfort of development you are used to on j2se.

Pstros is intended mainly for developers to help them create j2me applications, but is simple enough to serve as the basic doja application viewer on computer platforms which lacks support of the device vendors.

There is a similar project targeted to MIDP api called Pstros.

Key features of the Jade:

- runs your j2me doja application: displays it on the separate window, accepts the keypress, draws the screen.
- multiplatform: is written purely in java (and AWT) and should work on many platforms
- virtual http access - no need for http server, files are loaded from the classpath location you provide
- configurable scratchpad file name and file size
- easy debug: debug non-obfuscated j2me code in your favourite IDE that supports java debugging.
- configurable screen size
- java interface that allows you to embed Jade in other Java application
- integrated image viewer: helps the programmer to inspect images currently loaded in the device memory
- save screenshots and videos of your j2me application
- rescale the output screen on keypress (saves your eyes during developement, larger output for the application "live" presentations)

Things that Jade cannot do:

- no support for Doja api greater than version 1.5.
- no "real device speed" emulation
- no mld playback
- non complete support for some UI classes wich are not game or canvas drawing related (like dialogs etc.)

How to run and test the Jade:

At first you have to have some j2me doja classes or application which you want to run. Without them Jade can not operate.

Download the Jade package from here and store it in the accessible directory. Jade can run your j2me application either in unpacked form (classes and resources stored in the local directory) or in the packaged form (jar and jam files).

1) packaged application can be run from command line this way:
java -jar jade.jar MyGame.jam -w176 -h176
The first pstros parameter is the name of the jam file (the application descriptor), following parameters are the width and height of the device screen.

2) unpacked application can be run from command line this way:
java -jar jade.jar -CMyAppli -w176 -h176 -s2
Parameter -C specifies starting class of your application (must extend the IApplication class), parameter -w and -h specifies width and height of the virtual device screen, parameter -s specifies initial screen scale factor.

3) "developer" invocation method suitable for IDE (like Eclipse) which allows you to specify external main function that starts your application. Use ole.jade.MainApp as your start class and specify the additional parameters mentioned in the second example. This invocation method can be also used from command line this way:
java -Xbootclasspath/a:jade.jar;./www;MyGame.jar ole.jade.MainApp -CMyAppli -w176 -h176
note: here you can see how the ./www directory is passed on the bootclasspath which allows you to use fake HttpConnection that reads files from the classpath directory. Simply put your web files to the ./www directory and HttpConnection should be able to access them from within your application.

Input and keys:

Jade has no visual representation of the device other than the current device screen. So you can control the apllication via keypresses only. While some people might consider it "user-unfriendly" I found it quite handy in my daily developer work (and if you really need to have some clickable skin of the device you may create your own).

Here is the default key mapping:

Enter - fire
Esc - exit the application and close the pstros
F1 - left soft key
F2 - right soft key
Arrows - directional arrows
numeric keyboard - number keys, key placement match the device keys (for example number 9 on the pc numeric keyborad match the number 3 on the phone keyboard)
F11 - save screenshot
F12 - starts/stops video capture
Alt+v - turn on/off the verbose mode
Alt+i - open image viewer window
Alt+k - swap numeric keyboard key mapping (1-7, 2-8, 3-9)
Alt+d - open distance, zoom, color window
Alt+g - directly invoke garbage collector
Alt+1 - set screen scale 1
Alt+2 - set screen scale 2
Alt+3 - set screen scale 3

Host platforms:

Jade was successfully tested on Windows platform. However it is written purely in j2se without any native methods so it should work on a valid j2se virtual machine.

Terms of use:

This version of Pstros software is freeware. You may use it, but you must not sell it and you must not distribute it either standalone or as a part of your product. Also by using the Jade software you acknowledge and agree with the fact that Jade software may not produce exact and/or correct results.

Contact:

You can reach the Jade author here: ole00 at post dot cz.