Question

Do you know of a runtime written in Java/J2ME, that is capable of reading and executing a script/binary file?

Was it helpful?

Solution

I wrote just such a language designed to be small enough for J2ME, and to not use reflection/code generation/etc...

http://www.hecl.org

It's open source under a liberal license, so you're welcome to take it, study it, include it in your own programs, or hack it to make it behave like you want.

For 'regular' Java, there are other languages that do more and are faster and more complete.

OTHER TIPS

Wikipedia has a complete list. However, you sound like you're probably interested in Jython and JRuby.

I know of an x86 emulator written in Java, JPC

Many JVM Languages - Clojure, for example. There are pretty much hundreds of JVM languages floating around, most of which were implemented in Java - Scala, Rhino, etc.

In terms of unique languages, the major ones are Clojure and Scala. Additionally, there are ports of many major languages to the JVM platform, mostly high-level languages. These include Ruby -> JRuby, Python -> Jython, and JavaScript -> Rhino. A more complete list is here.

This is an impressive list of programming languages for the Java virtual machine :

Programming languages for the Java Virtual Machine JVM

The problem is that j2me can be too limited in its use of reflection to enable this, so you need to investigate your specific target.

In terms of java in general, there are many, such as JRuby, Beanshell, Jython, etc.

I just listened to a Software Engineering Radio podcast where a Sun developer talked about Maxine which is a JVM that is mostly implemented in Java itself. It was a very interesting interview and technology.

So it's feasible that someday Java itself (meaning the standard JVM) will be implemented in Java much like C compilers are written in C (after a bit of bootstrapping).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top