[ARCHIVED] PluotSorbet is a J2ME-compatible virtual machine written in JavaScript.
Перейти к файлу
Marco Castelluccio a22d7763ee Add other stub natives 2014-11-08 17:19:24 +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 Add the standard javax.microedition.pim.handler class (PIMProxy) and its dependencies 2014-11-07 02:21:00 +01:00
libs Implement getFirst and getNext. Fixes #517. 2014-11-06 19:06:57 +01:00
midp Add other stub natives 2014-11-08 17:19:24 +01:00
style Modify file ui dialog style 2014-11-01 13:51:28 +01:00
tests Add tests for getFirst and getNext 2014-11-06 19:09:06 +01:00
.gitignore ignore instead of deleting pre-processed files 2014-11-03 11:58:32 -08: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 Update Makefile to use the httpServer with caching disabled 2014-10-31 12:50:13 +01:00
README.md Update documentation: use httpServer.py instead of SimpleHTTPServer 2014-10-31 12:51:08 +01: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 WIP PIM natives 2014-11-07 11:08:53 +01: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 Improve perf of createAlternanteImpl 2014-11-03 17:47:51 -08:00
opcodes.js cleanup opcode table 2014-07-12 11:48:05 -07:00
override.js Improve perf of createAlternanteImpl 2014-11-03 17:47:51 -08: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 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