[ARCHIVED] PluotSorbet is a J2ME-compatible virtual machine written in JavaScript.
Перейти к файлу
Michael Bebenita 9cbb5aa1b2 Dump call graphs. 2014-11-18 18:20:20 -08:00
certs
classfile Move javaUTF8Decode function to util.js 2014-11-13 22:24:59 +01:00
java Don't throw a RuntimeException in DeviceControl::setLights 2014-11-15 00:54:37 +01:00
libs Resolve merge conflicts. 2014-11-17 15:58:56 -08:00
midp Resolve merge conflicts. 2014-11-17 15:58:56 -08:00
opt Dump call graphs. 2014-11-18 18:20:20 -08:00
style Modify file ui dialog style 2014-11-01 13:51:28 +01:00
tests Resolve merge conflicts. 2014-11-17 15:58:56 -08:00
tools Add packaging helpers 2014-11-07 15:24:23 -08:00
.gitignore Add new files generated by Jpp to .gitignore 2014-11-14 22:12:32 +01:00
.travis.yml
LICENSE
Makefile add 'app' target to make output dir containing app files 2014-11-14 09:39:28 -08:00
README.md Update documentation: use httpServer.py instead of SimpleHTTPServer 2014-10-31 12:51:08 +01:00
arrays.js
classes.js Resolve merge conflicts. 2014-11-17 15:58:56 -08:00
classinfo.js Some cleanup. 2014-11-18 01:03:00 -08:00
compatibility.js Fixes chrome: 2014-11-11 16:40:32 -08:00
compiled.js Some cleanup. 2014-11-18 01:03:00 -08:00
context.js Some cleanup. 2014-11-18 01:03:00 -08:00
desktop-ui.js
dumplog.py
frame.js Add support for invoking natives. 2014-11-04 09:33:20 -08:00
game-ui.js
index.html
index.js
instrument.js measure async natives per promise 2014-11-14 09:03:12 -08:00
jsshell.js Some cleanup. 2014-11-18 01:03:00 -08:00
jvm.js
legacy.js
main.html Some cleanup. 2014-11-18 01:03:00 -08:00
main.js Some cleanup. 2014-11-18 01:03:00 -08:00
manifest.webapp specify origin for packaged app in manifest 2014-11-10 14:30:32 -08:00
native.js Add mmapi-configuration property 2014-11-14 22:58:48 +01:00
opcodes.js
override.js Resolve merge conflicts. 2014-11-17 15:58:56 -08:00
runtime.js Resolve merge conflicts. 2014-11-17 15:58:56 -08:00
signature.js
string.js
timer.js
util.js Move javaUTF8Decode function to util.js 2014-11-13 22:24:59 +01:00
vm.js Some cleanup. 2014-11-18 01:03:00 -08:00

README.md

j2me.js Build Status

j2me.js is a J2ME virtual machine in JavaScript.

The current goals of j2me.js are:

  1. Run MIDlets in a way that emulates the reference implementation of phone ME Feature MR4 (b01)
  2. Keep j2me.js simple and small: Leverage the phoneME JDK/infrastructre and existing Java code as much as we can, and implement as little as possible in JavaScript

Building j2me.js

Make sure you have a JRE installed

Get the j2me.js repo if you don't have it already

    git clone https://github.com/andreasgal/j2me.js

Build using make:

    cd j2me.js
    make

Running MIDlets, tests

To run a MIDlet:

    python tests/httpServer.py &
    http://localhost:8000/index.html?jad=ExampleApp.jad&jars=ExampleApp.jar&midletClassName=com.example.yourClassNameHere

URL parameters:

  • See full list at libs/urlparams.js
  • Default midletClassName if none specified is RunTests

If testing sockets, 4 servers are necessary:

    python tests/httpServer.py &
    python tests/echoServer.py &
    cd tests && python httpsServer.py &
    cd tests && python sslEchoServer.py &

To run specific tests (e.g. TestSystem and TestRC4):

    python tests/httpServer.py &
    http://localhost:8000/index.html?args=java/lang/TestSystem,javax/crypto/TestRC4

Full list of RunTests tests available in the tests/Testlets.java generated file

There's no UI to enable certain privileges on Desktop that MIDlets might need. Use Myk's tcpsocketpup addon to accomplish that

Continuous integration:

  • Uses Travis
  • Runs automation.js which uses Casper.js testing framework and slimer.js (Gecko backend for casper.js)
  • make test

gfx tests use image comparison; output should match reference

Logging

See logConsole and logLevel URL params in libs/console.js

Running j2me.js in the SpiderMonkey shell

  1. Download the SpiderMonkey shell

  2. Execute the jsshell.js file as follows:

     js jsshell.js package.ClassName