Java on iOS

So there was this announcement: http://www.apple.com/pr/library/2010/09/09statement.html from a while ago. The interesting bit is that they now say

That’s nice since we’re allowed to generate obj-c, etc., from the different tools again, but now I’m wondering if it’s possible to just bundle a JVM and java code into a single executable? If all of the .class files are contained in the app there is no downloading of code. I haven’t read the new license yet, but maybe some else knows more?

Basically, whoopee, if anyone can get an ARM VM that works fast enough. Such a VM does exist, I just had a frankly unproductive discussion with an Oracle sales droid about getting their ARM VM for embedding on iOS. I will keep chipping away at them.

Cas :slight_smile:

why not try GCC? it should be possible to compile to ARM on it.

Further, Java code compiles reasonable well with it, only thing is you’ve got to be a bit more careful with garbage collection.

Yeah, well, I’m not careful with GC any more :slight_smile: I’m relying on it being there and being good. I suppose I could work around that with good ol’ object pooling.

Cas :slight_smile:

I’ve always gotten the impression GCJ is buggy, rarely updated and has quite limited support for Java.

An alternative I’d like to try is to use GWT. For those who don’t know it compiles Java to HTML/JavaScript (which you can then be embedded within an iPhone app). Downside is that you won’t have the full Java API at hand.

see this game, its a java game, uses LWJGL and is compiled by GCJ, runs really well here.

OTOH it does have rather minimal system requirements, and Kev says that even that was a major pain to get working right.

Cas :slight_smile:

That was an awfully long time ago now, GCJ has come on leaps and bounds. The GC is pretty decent.

An iPhone VM seem emminently doable to me though :slight_smile:

Kev

It’s already been bloody done, just Oracle are roughly as clueless about client-facing Java as Sun were :frowning:

Kev, are you interested in porting Puppygames to GCJ builds for us?

Cas :slight_smile:

I’d be tempted to check the progress of shark/zero.

Still a mismatched pile of broken partially working complex buggery. When it’s a proper integrated slick toolchain… and actually fast… yahoo!

Cas :slight_smile:

hi, ppl

cas, is this the VM you were talking about? http://blogs.oracle.com/java/2010/11/new_java_se_for_embedded_devices_release_delivers_improved_performance_more_hardware_support_latest.html

That’s the one.

Cas :slight_smile: