Sun working on Java for the iPhone
Sun Microsystems is known for many things, but it is probably best known for Java. The promise of Java is that programmers can write an application once and run it on any machine, or device, that has a Java Virtual Machine (a virtual environment that runs on a computer which includes the Java runtime, so that the Java code can run). That's the promise of Java, sadly, the reality isn't always the same. Java Virtual Machines on different platforms often require special code (which kind of defeats the purpose) and most damning of all (especially on the Mac) is that Java has its own library of UI elements. Unless a Java programmer goes out of their way to make sure their app looks like a native app, it often has an unmistakable 'Java look' to it.
Sun now wants you to have all that Java fun on the iPhone. Shortly after the launch of the iPhone SDK, Sun started looking into the possibility of making a Java VM for the iPhone. After some investigating, they are sure that Java ME (that's the version of Java optimized for mobile devices) on the iPhone is possible and Sun wants to bring it to you. I'm sure there are many Java developers out there are very happy to hear this news.
Thanks, TJ.


![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 2)
Doctor Fegg said 6:22PM on 3-08-2008
Interesting comment on the InfoWorld article that the SDK terms potentially forbid this.
Still, I'm sure Adobe are having similar thoughts re: Flash...
Reply
Mark 2000 said 6:32PM on 3-08-2008
Didn't Jobs say Java was a dead language? You know, along with reading...
Reply
Simon Arch said 12:57AM on 3-09-2008
Is this the same Jobs who said there was not going to be a video iPod? Seems he's not all that reliable. ;)
Brendan West said 6:50PM on 3-08-2008
I don't see how this is possible, according to the information I've read on the SDK, only one third-party app can be running at any given time, and that app cannot run in the background. You'd have to launch the Java app and from within it do everything you need to do.
A waste of time, UHO
Reply
Daniel Woods said 6:51PM on 3-08-2008
With technologies like Ajax and other advanced web APIs, Java, ActiveX and Flash are becoming more irrellevant
The only requirement for Java and ActiveX in my environment are some proprietary report viewers at work. The only requirement for flash is to watch moviesbonlone that I shouldn't be watching anyway.
Reply
Al said 5:09PM on 3-09-2008
I think you are confused...it sounds like you are talking about Java applets, which are a tiny subset of what Java is actually being used for in the real world. It is very popular as a server side platform (J2EE), and is also quite prolific as a mobile application platform (J2ME).
Eckofish said 7:20PM on 3-08-2008
Any idea how to get the Interface Builder to show the iPhone library? I've been looking around it for hours with no look.
It appears that you can't create iPhone interfaces yet. Unlike what was shown in the demo.
Reply
Tony said 8:06PM on 3-08-2008
It doesn't exist yet.
The shipped SDK is gcc, some headers, and an emulator. That's it. There's also some glue to allow you to create projects in xcode but it's not integrated.
What they showed was probably a very early alpha of the final release (or possibly even a mockup and there's no code at all yet).
Brian said 12:48PM on 3-09-2008
You can create iPhone interfaces you just have to do it the old fashioned way and build it in code. I have managed to get my apps interface all sorted, just need the back end logic now.
Ahoge said 7:31PM on 3-08-2008
I don't want java on my iPod, I try to avoid java apps on OS X(but I have to use some), they don't look good, are memory hogs, lack integration and inferior in performance. But I like coffee.
Reply
G said 7:35PM on 3-08-2008
And you thought Flash was slow. We'll show you what's slow!
Reply
yokken said 11:29PM on 3-08-2008
for real. java is the slowest piece of crap ever.
jchull said 12:13PM on 3-10-2008
Groundless statements like that make you look like an idiot
will said 7:56PM on 3-08-2008
the prospect of having real time public transport positioning on my iphone is well worth how slow this will load.
Reply
airmanchairman said 7:40AM on 3-09-2008
IMHO, while the native usability, games and other apps will obviously beat any JME equivalents hands-down for speed and integration with the iPhone, the latter may well benefit those with a must-have app not catered for by the developer community that's just starting off, and help them port their favourite game or obscure app over to the iPhone.
That can only help both parties, i.e. satisfy users and sell more iPhones. Win-Win!!
airmanchairman said 7:44AM on 3-09-2008
.... and as for the multi-tasking and memory management limitations so many iPhone detractors and fanboys alike are crowing about, that I am sure is an on-going development issue that will likely be resolved with software and firmware upgrades as time goes by, if not before late June when this all kicks off for real.
Gene Cowan said 8:01PM on 3-08-2008
Did Sun just announce this on their own, or in conjunction with Apple? 'Cos as far as I can tell, the terms of the SDK say that one can't run an emulator or other operating system. If they're not working with Apple on this (which seem unlikely given Steve Jobs' dismissal of Java) then Apple certainly won't OK it for distribution...
Reply
giorga said 9:14PM on 3-08-2008
C'mon guys, this is the boringest news possible. Old news, dead language, dead future. And Sun, please allocate all those brilliant minds to something more future-proof than Java.
Reply
Mike said 7:22PM on 3-10-2008
Take Job's head out of your ass for once. Java isn't a dead language.
Christopher Green said 9:46PM on 3-08-2008
I get annoyed at the fact that people blame java for being laggy and slow, it isn't native speed and we all know that but java apps can be written that are more than usable.
I was under the impression web objects is built upon java, which in turn powers the iTunes store... Irrelevant? i think not :P
Reply