[ARCHIVED] PluotSorbet is a J2ME-compatible virtual machine written in JavaScript.
Перейти к файлу
Marco Castelluccio 21e5973901 Don't try to infer the media format from the content only if contentSize is 0 2014-11-17 00:38:07 +01:00
certs only use test cert when running tests 2014-10-22 12:13:19 -07:00
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 start numbering file descriptors from 3 2014-11-14 13:14:59 -08:00
midp Don't try to infer the media format from the content only if contentSize is 0 2014-11-17 00:38:07 +01:00
style Modify file ui dialog style 2014-11-01 13:51:28 +01:00
tests Enable getInt test 2014-11-15 17:52:33 +01: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 Use "th.check()" in the added StringBuffer tests. 2014-10-01 10:30:24 -07:00
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 Handle uncompressed entries in |loadFileFromJar| 2014-10-22 17:56:54 -07:00
classinfo.js Merge branch 'master' of https://github.com/andreasgal/j2me.js into jitjit 2014-10-28 23:25:03 +01:00
context.js Move newArray and its relatives from Context and Runtime to util 2014-10-27 13:13:54 +01:00
desktop-ui.js
dumplog.py
frame.js Remove isSynchronized property from Frame now that we have the isSynchronized property in MethodInfo 2014-10-10 14:32:47 -07:00
game-ui.js
index.html use setZeroTimeout 2014-10-15 15:14:13 -07:00
index.js clean up logging and error reporting 2014-10-22 16:32:32 -07:00
instrument.js measure async natives per promise 2014-11-14 09:03:12 -08:00
jsshell.js Add benchmarks for the various method type invocations. 2014-10-15 13:42:34 -07:00
jvm.js Move newArray and its relatives from Context and Runtime to util 2014-10-27 13:13:54 +01:00
legacy.js
main.html Implement native method to enumerate content types for com.sun.mmedia.DefaultConfiguration. 2014-11-14 11:04:17 +08:00
main.js Only load tests.jar when actually testing 2014-11-07 15:30:51 -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 Convert numbers to integers in natives that should return integers 2014-11-15 17:51:51 +01:00
runtime.js Move newArray and its relatives from runtime.js to util.js 2014-10-27 13:04:14 +01:00
signature.js Fix IN slots counting bug 2014-10-17 11:46:52 +08:00
string.js Pass ctx as last optional parameter. Fixes #485. 2014-10-27 12:37:53 +01:00
timer.js
util.js Move javaUTF8Decode function to util.js 2014-11-13 22:24:59 +01:00
vm.js Add parameter to VM.compile to generate some debugging statements in the compiled functions 2014-10-31 01:43:56 +01: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