M-JVM (current version 1.03)

a KVM written in Java

    I had written a JVM implementation in Java and called it MJVM. Because the framework written with Java 1.1, it can be started on any Java since 1.1 or later, as you see it can be used on mobile devices with J2ME or iTV devices. The framework gives very good possibilities for a developer to use pure Java compiled class files as scripts with full control over their execution. The framework gives can be used in a lot of use cases as an example:
 - it can emulate the "ClassLoader" mechanism on J2ME based platforms and you can load classes from network on mobile devices and play them.
 - it can be used to emulate a platform (as an example, it is potentially possible to emulate the Android platform  on a standard J2ME device with the framework :) )
 - it allows to increase compression ratio because the framework loads classes from an InputStream and you can glue a few classes in one binary file (it allows the Jar utility to pack them really better) and load them sequentially.
 - many others :)

 The framework includes three main classes (more detailed information you can find in the JavaDoc for the library):
    The library is distributed under LGPL and it can be downloaded below from ths page. The library archive includes sources, JavaDoc and compiled library as a JAR file. As well there is the source of the sample midlet which uses a  Java class file as a script to drive blocks on the screen. I had tested the midlet on different emulators and a real Nokia 6230  device and it worked well and pretty quickly. Of course I understand that the library is not very optimally written but the frst version had been written in 3 days :) (I wrote all the project in my weekend). You should understand that it is one from my home pet projects and I can't spend a lot of time for it, so I am not sure that new versions of the library will be produced very often.

Download here-> Version 1.03 17-apr-2009

Examples
Hello world! It shows how to write a hello world script and process its calls to a MJVMProcessor mjvm_hello_world.zip
Vector useThe example shows how to work with Vector object in scriptsmjvm_vector_use.zip
SynchroThe example shows ow to work with synchronized methods and objects.mjvm_synchro.zip

Utilities
MJVM Stub GeneratorThis utility allows to generate a java class source that implements the MJVMProcessor interface. The generated class can be used to process calls from a MJVMClass object.mjvmgen_100.zip

 MJVMTestMidlet screenshot


© 2003-2010 Igor A. Maznitsa. All Rights reserved.