[ARCHIVED] PluotSorbet is a J2ME-compatible virtual machine written in JavaScript.
Перейти к файлу
Marco Castelluccio b038696d95 Add nokia.image-processing to the list of unimplemented Nokia-specific localmsg servers 2014-11-02 19:35:39 +01:00
certs only use test cert when running tests 2014-10-22 12:13:19 -07:00
classfile Attempt to use TextDecoder for parsing mod-UTF-8 2014-10-28 13:18:20 -07:00
java Merge pull request #500 from marco-c/jpp 2014-10-29 09:28:28 -07:00
libs disable gamepad by default 2014-10-27 14:23:23 -07:00
midp Add nokia.image-processing to the list of unimplemented Nokia-specific localmsg servers 2014-11-02 19:35:39 +01:00
style disable gamepad by default 2014-10-27 14:23:23 -07:00
tests Fix indentation 2014-10-31 01:20:50 +01:00
.gitignore only use test cert when running tests 2014-10-22 12:13:19 -07:00
.travis.yml fix error in travis config 2014-08-04 19:59:13 -07:00
LICENSE Use "th.check()" in the added StringBuffer tests. 2014-10-01 10:30:24 -07:00
Makefile test HTTPS connection 2014-10-23 14:19:32 -07:00
README.md RunTests1 -> RunTests 2014-10-30 09:51:47 -07:00
arrays.js fix a couple array handling bugs 2014-07-18 01:20:06 -07:00
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 Show the coordinates when mousing over the canvas for debugging 2014-08-06 17:20:40 -04:00
dumplog.py Use a simple python tool to print the log file 2014-09-17 13:09:34 -07:00
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 whitespace fixes 2014-08-05 22:11:32 -07:00
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 Merge pull request #515 from mykmelez/profile-without-instrumenting 2014-10-31 00:24:54 +01: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 Fix Math.fround polyfill 2014-09-17 09:12:50 -07:00
main.html cache mobile info on startup 2014-10-15 16:11:41 -07:00
main.js use 'in' operator for to clarify conditional 2014-10-27 14:39:55 -07:00
manifest.webapp rename files to match current scheme 2014-10-12 22:50:58 -07:00
native.js Add fileconn.dir.photos property 2014-10-31 11:31:02 +01:00
opcodes.js cleanup opcode table 2014-07-12 11:48:05 -07:00
override.js Move newArray and its relatives from Context and Runtime to util 2014-10-27 13:13:54 +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 add zero timer 2014-07-17 21:18:53 -07:00
util.js Add a fallible UTF-8 decoder to util 2014-10-28 13:09:30 -07: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 -m SimpleHTTPServer&
    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 -m SimpleHTTPServer &
    python tests/echoServer.py &
    cd tests && python httpsServer.py &
    cd tests && python sslEchoServer.py &

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

    python -m SimpleHTTPServer&
    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