JamVM on iPhone

I’ve recently come across JamVM, it looks like a really nice, small and decent speed JVM. There have already been people running LWJGL’s OpenGL-ES binding with JamVM on ARM devices at pretty decent speeds. Example.

Apple also relaxed the restrictions in there TOS last year in relation to interpreted code and even allows tools like like Unity3d, Mono Converters, various emulators, etc. The only restriction currently being that tools can’t run downloaded code (like the Flash plugin).

The JamVM site says that it runs fine on the iPhone [quote]“built using unofficial toolchain and tested on a jailbroken iPhone”
[/quote]
Just curious, what’s stopping people from running JamVM applications on iPhone now and releasing on the AppStore?

edit: uh didn’t read carefully :(…
Apple’s License? I think the current one states the following: “Notwithstanding the foregoing, with Apple’s prior written consent, an Application may use embedded interpreted code in a limited way if such use is solely for providing minor features or functionality that are consistent with the intended and advertised purpose of the Application.”
I think most games are easier to port to ObjC or Flash/Unity3D than getting this stuff to work. http://www.in-the-box.org/ did not get much attention too. Unless there are commercial interests and official ways to do this, I guess, it is only interesting for hobbyists and people who like to do risky experiments.

Also been looking very closely at JamVM. The Dalvik VM was effectively forked from JamVM, which would lead me to think that the speed will be similar (and therefore “acceptable”). In particular something that really impressed me about JamVM (well, Dalvik) is that it is a 100% complete, compliant J2SE VM, with synchronisation, references, accurate GC, native threading, and even the full Java serialization protocol working. I’ve been compiling resource on my desktop and the resulting binary files work perfectly in Dalvik!

One issue with JamVM might be though, that last time I heard, iOS will not allow normal applications to write to code memory (a la JIT compilation). This would force JamVM to run in purely interpreted mode, which is about 2-5x slower most of the time, and unfortunately that’s back in the realms of “not very useful”. Except maybe for turnbased stuff, so an eye might still be kept askance upon it.

A LWJGL binding to iOS would be sweet in any case.

Cas :slight_smile:

Or do AOT compilation.

Indeed, though AOT compilation is a bit of a different kettle of fish from what JamVM does. I’ve contacted the author about this very idea… wonder if he’ll reply.

Cas :slight_smile:

question is, does it work on other IOS devices like the fondleslab?

This article http://www.infoq.com/news/2011/10/oracle-client-java might be interesting in the context of this thread. In particular the “precedent” set by Cyberduck on the OSX app store (in quotes because I’m not sure how much of a precedent it really is! :slight_smile: )