Sun Is Porting Java To the iPhone 275
krquet notes an InfoWorld article on Sun's plans for the iPhone. After studying Apple's newly released SDK docs for 24 hours, Sun decided it was feasible to develop a JVM, based on Java Micro Edition, for both the iPhone and the iTouch. An analyst is quoted: "I think going forward, with the SDK, it takes out of Apple's control which applications are 'right' for the iPhone." The article doesn't speculate on how Apple might to react to such a loss of control. "Apple had not shown interest in enabling Java to run on the iPhone, but Sun plans to step in and do the job itself... The free JVM would be made available via Apple's App Store marketplace for third-party applications."
Re:Apple's stance (Score:5, Interesting)
Oh boy! Time for some barely useable ports... (Score:2, Interesting)
Re:Apple's stance (Score:2, Interesting)
Re:Apple's stance (Score:5, Interesting)
Re:Oh boy! Time for some barely useable ports... (Score:4, Interesting)
For Swing apps, isn't that Apple's fault? They did the JVM port to OSX, after all... they had the power to make the JVM merge the Swing menu with the Apple menu using OS hooks.
Instead, they chose to have it display at the top of each application like Windows and most XWindows GUIs.
Network-Mobile Objects (Score:5, Interesting)
The same JME applets will run on any of those devices. In fact, the Java classloader lets any running Java program load a class from any other Java device connected by the network, load it and run it (safely) locally.
I wonder whether having lots of developers targeting a very featureful terminal that can be used as a "universal remote" for all these personal devices will finally offer some good applications for Java's ability to transmit the same objects around all the devices. Like the GUI objects installed in each device being available on any other device, to control the "home" device in familiar terms. Or any other of these.
And if that "mobile objects" platform does indeed come of age, will even Sun's "JavaSpaces" [wikipedia.org] finally have a use for its far-out platform?
Will all of Sun's "useless" Java platforms from the past decade+ eventually be recognized as "visionary"?
Re:Apple's stance (Score:2, Interesting)
I think this is great, used to think that I'd had enough of j2me but now I'm finding myself interested to tinker with this gizmo. First the sdk and now java, good times ahead.
Re:Oh boy! Time for some barely useable ports... (Score:5, Interesting)
And I don't want to sound all negative, because there are plenty of good Java based programs on Mac. For example, Lux does a great job with the interface (maybe because it started on Mac and was ported the other way), but I'm still worried. The prospect of hundreds of developers jumping on the iPhone thinking "I already know Java, so I don't have to learn anything new" seems like it could end badly. I guess we'll have to wait and see what happens, if Sun does go through with this.
24 hour decision for a fortune 500 company? (Score:-1, Interesting)
It's vulnerable enough without a hackneyed java client, thanks. Slow enough also.
Wasn't really designed for business either, if that's what they're pushing it towards.
If there's one area iPhone really doesn't need more options, it's attack vectors.
And it voids your warranty, right? Sure, every business has an in-house iPhone reflashing service.
Dunno, take another 24 hours and think about it.
Re:Oh boy! Time for some barely useable ports... (Score:5, Interesting)
Java is a decent language. The library support is fantastic. With Sun opening up Java, its time to reconsider the use of a VM to draw our desktops. Certainly Java is preferred to Mono
Still, there is a certain amount of Java-biased derision echoing about slashdot. Perhaps those issues need to be addressed before advocating the embracing of Java. Yet it is a decent language, one of the best of the curly bracket languages
Re:Apple's stance (Score:3, Interesting)
Re:Not without a private agreement with Apple (Score:5, Interesting)
As for Silverlight... no thanks. Microsoft has proven that their 'no sandbox' security model is completely unworkable so many times that it amazes me that anyone would consider taking yet another spin on the wheel. ActiveX,
Re:Loss of Control (Score:2, Interesting)
I still doubt Apple will release control. I'd be similarly surprised if Apple even allowed Sun's Java on the iPhone at all. After all, once Java gets on there with internet access, there's no way they can control additional Java apps from being sent to the phone... well I shouldn't say no way, but it'll be a lot harder.
i call bullshit.... (Score:4, Interesting)
if you have a java application and want the menu bar to appear at the top of the desktop (like all other OS X apps), then simply invoke the jvm/java app and pass the following system property as a JVM arg:
-Dcom.apple.macos.useScreenMenuBar=true
as described here [sun.com]
its not that complicated....
Re:Apple's stance (Score:2, Interesting)
What if people starts to use the higher than average CPU speed and memory of iPhone to setup "Javatunes Store" ? What if they offer Skype calling? What will phone company say?
If Java was unsecure, we would be fighting eachother with stones and sticks instead of posting to slashdot. Java is secure enough for a BANK, Military, Space, mission critical things. Forget the 1 billion handheld devices having java in them and there hasn't been a single java security issue like worm.
If iPhone gets J2ME, I may consider to buy it since my banks pseudo random password generator runs on it as well as their millions of customers.
Re:Not without a private agreement with Apple (Score:3, Interesting)
thanks for the idea! (Score:3, Interesting)
Wow. Your post got me thinking. I could write a remote-control interface for my iPhone that would send commands via TCP/IP to my MythTV box. Change channels, play / record, etc. over wi-fi.
Seth
Re:Apple's stance (Score:3, Interesting)
As for Java being faster? Well, the benchmarks [debian.org] disagree. And, of course, there are ways of making Objective-C as fast as C if you have some bottlenecks where you're willing to sacrifice a little flexibility.
I can definitely see a business case for Java on the iPhone - there is a lot of existing Java (particularly J2ME) code out there for mobile apps. With a JDK that had a nice UIKit wrapper it would be possible to reuse a lot of the existing code and just add a new UI.
You're annoying to discuss this with (Score:3, Interesting)
That's funny, because very little you said responded to it - in fact you're more guilty of using his posts as a springboard for tangential rants than he is.
Not from where I'm standing - your points are orthogonal to his central argument, and mostly to do with how great Java is for everything.
eh?
The only people asking for Java on the iPhone will be phone developers who want to make a quick buck with a port of their existing J2ME app, and corporate developers who follow the religion - customers will avoid it like the plague because it will suffer from the same mediocre mongrel interface as Java on the desktop does on every platform, and the apps won't feel like they belong, because there won't be proper integration with things like the touch screen, native UI transitions etc etc.
Java on phones is not dead, it just deserves to die, and roping J2ME to the new hot platform is not going to make it magically better. There's an interesting post further up this thread about the mediocrity [slashdot.org] which is Java as a language, but all that doesn't matter to the users; the ultimate arbiters in this matter, all they care about is the UI and user experience, which is historically Sun's weakest point.
Maybe that's why phone UIs almost universally suck - I know the ones using Java for apps that I have used do, not really because of Java the language, but because of the libraries and UI conventions used, which are presumably closely tied in with the framework itself. I'm sure it's *possible* to do anything, but developers will tend to do what is easiest with a given framework.
Maybe he just felt it was irrelevant and of more interest to Java aficionados than anyone else. Sounds like a solution looking for a problem to me - I'm sure it would be neat and all, but ultimately as a user I don't really care if you use the same objects on several different interfaces, it _might_ even end up a horrible kludge if they have different screen sizes and UI control schemes and the views aren't appropriately tailored. By the by, this facility (distributed objects) has been available in Objective C since the mid 90s, even if it's not available on the iPhone. Java really isn't as original as you seem to think it is. It's just as derivative as Objective-C for example, and if it ever was visionary, it isn't now.
Well the future will tell all (including maybe even telling you you're wrong, if you're willing to listen), but if it's anything like the acceptance by consumers of Java on desktop OS X, you'll have a hard time convincing someone to use your J2ME app over a native one, that's if Sun even manages to get a credible solution supported on the iPhone.
Frankly I find his arguments more convincing that yours, because they're grounded in an understanding of what the *user* wants, not a Java developer's hopes.
Re:Apple's stance (Score:1, Interesting)
The Objective-C compiler only has access to the Objective-C source code when compiling the code, and the run-time (AFAIK) only optimises method calls (by caching them).
The Java HotSpot JIT on the other hand has access to the source code but also the run-time profile of the executing code, and can thus optimise the execution in many more ways.
That's how Java can be as fast, even faster, than C, and is currently way faster than Objective-C. This is not to say that the Objective-C run-time couldn't be changed to do more optimisation.