Skip to main content

Apple finally permits Java on the iPhone - When will Oracle deliver?

Posted by mkarg on September 10, 2010 at 1:17 AM PDT

When the iPhone came to market, Sun Microsystems announced that there soon will be Java for the iPhone. They got stopped by Apple's licence terms, which ban both, interpreted languages and code written in other language than C, C++, Objective C and JavaScript. Lately I read in the news that Apple change the licence terms, and found a promising statement on Apple's web site, so now interpreted code actually is allowed. So when will Oracle deliver Java SE for the iPhone? And is that Apple's surrender to the increase of Android's market share?


A complete overview of all my postings can be found in my web site Head Crashing Informatics (http://www.headcrashing.eu).

Comments

java on iphone is available today, check this ...

java on iphone is available today, check this out:

codenameone.com is a platform based on java that provides a native cross platform mobile solution.(open source project)

supported platforms: iphone, android, rim, win7 and j2me

Apple's right decision finally came after a long period. 23% ...

Apple's right decision finally came after a long period. 23% Users are alaways familiar hang to be with Java Apps. Supporters weren't getting much pleasure without Java Softwares. Java support is excellent and easy to use. That's why people love to use it. More-over Java Games Legend will be now on iPhone too. That's good news for Java App engineers and customers. Now anyone could say iPhone is All-in-One packege in the current circumstances. Finally, Get some iPhone Content.
Flickr App || iPhone Photography

Apple's rules

Here's the rule in question:

3.3.2 An Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded. The only exception to the foregoing is scripts and code downloaded and run by Apple's built-in WebKit framework.

So it sounds like interpreted Java is in, but I think issues with "no data memory turning into executable memory" will prevent a JIT from running inside the app sandbox. Thus I think you're basically left with pre-compiling the Java into ARM binary (ala gcj for ARM) or a slow interpreter.

Yes, I think that people are

Yes, I think that people are too excited. The only allowance for Java I see is as a source for binary compilation. Apart from the prohibition about "downloaded code" or JIT, let's not forget that Apple still decides what can be published on the Store. I don't think they have changed their mind (at least they didn't say) and I don't think they would allow a JVM to be released through the Store. It's a step forward, though.

I don't think they have

I don't think they have changed their mind (at least they didn't say) and I don't think they would allow a JVM to be released through the Store. It's a step forward, though.

On the contrary, they currently explicitly allow "interpreters", which if you turn off JIT is what a JVM is. You just have to include an entire JVM with every Java app, and only use it in interpreted mode.

Formally it would be possible :-)

The code simply must not download other code from the net. This only would need a modification in the classloader. Otherwise I think bytecode can be seen as interpreted code. Whether a classical interpreter or a JIT interprets is not defined. Latterly there is also a NDA Java mailing list for paying developers at the Apple developer website.

It would be a huge image polishing both for Steve's iOS and for Larry's Java. They both could use good news these days. Java would be the major phone platform and iOS would gain many developers and libraries.

For the AppStore they published clear criteria (that make sense in my eyes) and you get the opportunity to contradict formally (via a web site) to a decision of the AppStore.

don't get too excited...

Apple relaxed the restrictions on how you link to libraries, so can go through toolkits, and allow interpreted execution of code but not if you download the code.

So while you probably could have a JVM, you couldn't use a network classloader and any java code would have to be packaged locally.

Same with Flash - Adobe could provide a tool that would compile a Flash app into a standalone iOS app.

So you won't see a Java or Flash plugin for the iPhone web browser unless the rules change again.

Its Possible

From new license its seems we can have a JVM. Regarding the network classloader, in iPhone JVM implementation, it could throw a SecurityException when code it's not downloaded from applet store, or simply when it's used. Maybe now the port for phoneme Advanced can start again

--
Bruno Antunes

A conventional JVM cannot be used

From what I understand, reading the new rules and listening to how bloggers and industry commentators have interpreted them, the rule change would mean we could have Java on an iPhone, but only if Java ME (or JavaFX) was bundled individually with every application.  It seems the most likely reason for the rule change was to allow game engines to embed a Lua (or whatever) interpreter for their in-game events.  The rule suggests both interpreter and scripts have to live within the same application -- this is fine for Lua (where every game has its own copy of the interpreter), but not so fine for a single JVM installed as a shared resource.