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."
No posts and for once I have mod points ! (Score:3, Funny)
Re: (Score:2, Insightful)
Re: (Score:3, Insightful)
Welcome to 1995 I guess.
Loss of Control (Score:5, Insightful)
Re: (Score:2)
Re: (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 inte
Not without a private agreement with Apple (Score:5, Informative)
Now, this is certainly lawyer speak and probably covers more than they'd like - I very doubt they'd care if you used some of your own library code to script custom UI elements in, say, LISP. But it is certainly their intent to stop people from just republishing all the iPhone APIs under a new wrapper, then selling an "Interpreter App" that downloads and runs "jPhone Apps" (aka "data" for your special iPhone app), thereby bypassing all their controls. It certainly seems to rule out a JRE in the sense that we've used to, and from Apples point of view, this is correct (no judgements from me on whether this is a good thing or not).
Re:Not without a private agreement with Apple (Score:5, Informative)
What a lovely way for Microsoft, err sorry, Apple to find themselves in court. I'm sure the EU will look forward to the fresh cash injection. If Microsoft find themselves hundreds of millions of Euros down the swanny for failing to document APIs and make them available, what will be the fine for actively trying to prevent competitors having the same access to the machine that Apple does?
I guess Sun have read the API and know they can bend Apple over their own arrogance.
Re: (Score:3, Insightful)
Re: (Score:3, Funny)
Goddamn fanboys.
Re: (Score:2, Insightful)
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: (Score:3, Interesting)
I'm not sure what you're aiming at here, but .NET (and, by extension, Silverlight) has a sandbox security model; moreover, Silverlight (2.0) applications run in a rather restricted mode by default. If you trust Java applets, there's no reason to not trust Silverlight.
Re: (Score:3, Informative)
CIL is not run in a sandboxed interpreter like Java, it's just an intermediate form for native code.
And I did not consider the JVM security model acceptable when it was first introduced. Making part of the sandbox dependent on the class model was a very dangerous step, and it's only been the years of secure Java implementations that demonstrate that Sun's design is secure. And Sun's design does no
Re: (Score:2, Informative)
Re:Not without a private agreement with Apple (Score:5, Informative)
Re:Not without a private agreement with Apple (Score:5, Informative)
But Sun has Lawyers too, surely they've read the license as well. They wouldn't say they're going to make iPhone-java unless they saw a way to actually do it (albeit, their way to do it may just be to say they're doing it even though they know it's forbidden, and then try to drum up public support if Apple stops them).
It seems likely that larger players are getting access to extra capabilities not allowed by the public SDK.
Sun isn't the only big company doing things with the SDk that imply a special deal. AOL already demonstrated an AIM client for the iPhone, which would be rendered largely useless if it had to follow the restriction against public-SDK based apps running in the background.
Re:Not without a private agreement with Apple (Score:5, Insightful)
They make the JDK/JVM available only to developers. Then it's essentially just a library that a developer can use. The finished app still needs to go through Apple, and be posted as an individual app. And installing such an app on the iPhone doesn't enable the end-user to install any other apps on the iPhone.
I don't see Apple's terms as forbidding that.
Also, note that if you're a developer, you can install whatever you want on your own iPhone. That $99/year gives you the tools to install apps on your own phone by a mechanism other than the consumer-oriented ones. So, a more conventional JDK/JVM could be made available to developers pretty easily.
And there's also that talk about corporate centralized app-loading. We don't know what the rules for that are going to be, yet.
But it does seem likely that ordinary consumers are not going to be able to load a conventional JVM or Perl interpreter or PalmOS emulator or MAME implementation onto iPhones.
Re:Not without a private agreement with Apple (Score:4, Informative)
They might try that, but the article says, "The free JVM would be made available via Apple's AppStore marketplace for third-party applications." So if that's all they intend to do, they didn't get that point across to the reporter.
Re: (Score:3, Insightful)
An Application may not itself install or launch other executable code by any
means, including without limitation through the use of a plug-in architecture, calling other
frameworks, other APIs or otherwise. No interpreted code may be downloaded and used in
an Application except for code that is interpreted and run by Apple's Published APIs and built-
Re: (Score:2)
An anecdote: A few years back I worked on a project in which we investigated making some of our apps available on various smartphones. The main app that I worked on was remote access to medical databases, and we thought it could be very useful if, for example, emergency medical workers could have wireless access to their databases from an accident scene. We
Oh boy! Time for some barely useable ports... (Score:2, Interesting)
Re:Oh boy! Time for some barely useable ports... (Score:4, Funny)
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: (Score:2)
That is, it just glitz? Or is there any actual functional characteristic the iPhone has that sets it apart?
Re: (Score:3, Insightful)
Re: (Score:2)
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.
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: (Score:2)
Re: (Score:2)
They could merge the menus and disable the entries that aren't associated with the active window, just like any other app.
Re: (Score:2)
I
Re: (Score:3, Insightful)
Now that the Mac is overrun with terrible ports of Java apps with... menus at the top of windows instead of in the menubar
People seriously do that?
I'm kind of torn. On one hand, it's terrible form to violate an operating system's UI conventions. You just don't do that. On the other hand, having one menu bar for the entire system is the worst UI design decision I've ever seen. I'm really not sure which is the good alternative between those two... but I am still really honestly surprised that people are violating the system's UI conventions. How do they figure it's going to help usability, contradicting everything users of th
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.
Re: (Score:2)
Re: (Score:3)
Re: (Score:2)
Re:Oh boy! Time for some barely useable ports... (Score:5, Insightful)
http://en.wikipedia.org/wiki/Fitts'_law [wikipedia.org]
That "worst" UI design decision results in a menu bar of infinite size which is better for usability than a menu bar of finite size. Poke around the Mac UI and you'll find other examples of Fitt's Law, like how its tree displays work compared to everyone else's.
Re: (Score:2)
Re: (Score:2)
Heh. Apple's own "native" apps do it.
For example, I have a Safari window next to this SeaMonkey window that I'm typing into. When I click on the Safari window, the usual "Safari" menus appear in the top-of-screen menubar. But the Safari window has a number of bars across the top. One of them (I don't know what it's called) starts with "Google News", and when
Why the Micro Edition?! (Score:2)
Dlugar
Why bother? (Score:3, Insightful)
The outcome is that they are making a platform with a high degree of Apple lock in more attractive to consumers. When version two comes along with more effective control mechanisms users will be tied to Apple's integration services, and the tenuous foundations of a business model standing on some else's shifting sand will be destroyed.
So why do it? It's bad enough choosing to write apps for Windows, but at least there is some logic given the size of the user base. The iPhone user base isn't very big (compared to, say, s60) but it _will_ be if it becomes the best option in town because everyone has helped Apple make it the best tool around by writing software for it. Then a later version can close you out and bang, lay off time is here again.
Re: (Score:2)
Oh, noes! I've been laid off from my job of writing free apps for jailbroken iPhones for the fun of it!
(Yes, I suspect that's at least part of the logic - doing it for the fun of it. I doubt, for example, that there are zillions of customers who just won't buy an iPhone without term-vt100 [installerapps.com] and the
The beauty of letting Sun port it (Score:5, Insightful)
That opens up the iPhone (and iPod Touch but who cares about that minority,) for corporate deployment and all those goodies without exposing Apple at all.
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"?
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: (Score:2)
But you don't need Java to do that. A native iPhone app can send TCP/IP commands to MythTV.
What's really cool is when the MythTV server has Java applets for remote control that can run on you iPhone, and on your cablebox, and on your Blu-Ray player.
Re: (Score:2)
I, also, welcome our mobile class-loading Java-based Overlords.
Gagh. Did I actually say that?
Re: (Score:2)
If you read my post, you'd see that lots has changed. For one, Java is now the "native platform" on these other small multimedia devices like DVB/ATSC/BDP. You'd see that I proposed mobile objects with precisely the purpose of delivering native UIs from remote devices. Let
Re: (Score:2)
And so it looks like you've once again failed to read my post. Here's another free clue:
For one, I didn't say that Java is the native iPhone environment. I said that it's native to those other devices I mentioned, DVB/ATSC/BDP/phones.
For another, there is certainly a market for apps on those devices
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.
What about the fact that... (Score:2, Redundant)
Re:What about the fact that... (Score:5, Funny)
Re: (Score:2)
Well, Emacs does have one of the original multitouch interfaces...
(Doesn't it stand for "Escape Meta Alt Control Shift"?)
Re: (Score:2)
Re: (Score:2, Informative)
"Only one iPhone application can run at a time, and third-party applications never run in the background."
This is a completely fabricated limitation. For starters, the iPhone email app does run in the background (when it's fetching new messages). There is a good number of non-official (as in jailbreak based) 3rd party applications for the iPhone that run as background processes (including some popular daemons like apache, sshd, tinyproxy, etc). There are even applications that run their UI on top of the UI of another application (both applications running at the same time), like the dock App that runs on top o
In line with Design guidelines? (Score:5, Insightful)
Here's a short section of the interface design guidelines as released by Apple:
So when the JVM is used by an application, it'll be launched/terminated each time the app is switched to? I'm willing to bet that will make apps that leverage the JVM almost unbearable to use.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
That's got nothing to do with them controlling the OS... any application can do the same thing. They all run as root.
But, yes, I agree, they could have some daemon sitting there looking for unexpected processes and killing them, but if they did wouldn't you expect it to have shown up by now?
Re: (Score:2)
Re: (Score:2)
Oh well.
I hope Apple is not going to make the mistake of trying to push the idea that a leaky OS level sandbox is a free pass for security, the way Microsoft has.
Re: (Score:2)
You don't understand how this is all working.
The only way for ordinary consumers to install anything at all is going to be through Apple. You won't be able to hand someone a floppy with your own program on it and have them load it on their own iPhone. It won't work.
So, all Apple has to do to prevent third-party applications from running in the background is refuse to distribute any apps that do. An ordinary consumer with an or
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
It sounds like you're taking "launched/terminated" to mean "jumps to main()/gets a kill signal". I'm sure a hibernate/resume cycle will be just fine, in terms of meeting that requirement. The point is that when it's not in front, the app can't have any RAM footprint, any CPU cycles, respond to any interrupts, et cetera.
JDK 6 - Leopard?? (Score:3, Insightful)
There already is a Java port to the iPhone (Score:5, Informative)
It even comes with a simple demo Java app that uses the iPhone frameworks!
Admittedly it's pretty primal, and there's a long way from "JVM runs" to being able to run J2ME app's (like, for example, a GUI layer). But it's still really cool!
Re: (Score:2)
Uh, if Apple doesn't want it on the phone... (Score:2)
If you are talking about some sort of hack, then how is that different than all of the other hacks? I suppose it might make the iPhone easier to hack, but how hard will it be for Apple to put out a firmware update every three months or so that wipes out anything related to Java on the phone because it violates terms of service? Will serious users put up with that kind of instability?
If Apple doesn't want it to happen, it ain't gonna happen.
Thi
should be interesting... (Score:2)
should be a nice test of how control freak apple wants to be about the store.
Oh Please No (Score:3, Insightful)
If you compare the languages, Objective C and Java, odds are that Java really can't bring anything to the table that is going to make it stand out from the crowd. Java works if Java can stay in memory, or be the entire application interface so it's always in memory, that's how is can make a decent application for phones -- be the application. That isn't the case here. Apple has their own OS that they are running and it's pretty good. They won't get rid of it. So now you are going to run two on tandem. Which will be very bad for Apple.
JVM based widgets will suck ass and everyone will want to blame Apple for their shitty phone that doesn't run Java apps really fast. Well, it wasn't designed to. But there are like a million little programmers running around saying "Go Java" and banging out every kind of widget they can think of anyways. And still people will blame Apple for making a shitty iPhone because Java widgets don't run fast. Recall that it still isn't designed to do that.
I have a very strong dislike for Java because of what Sun did with it. They lowered the entry barrier to Java by making is really easy for someone to get a certification in a week and then start programming at a job. Problem is you end up with a lot of programmers who are stupid shits and can't code their way out of a paper bag. The really amazing programmers still exist, but they've been diluted by the thousands of overnight contractors that have no experience.
So the net effect is that you end up with a lot of bad programmers making a lot of bad programs on a code base that is very sub-optimal for the applications and platform that they are going to be developing. And even the really good programmers are going to struggle because it's not a native Java machine and they'll have to fight against that one.
I guess I forgot to say, I don't think that there is any problem with what Apple is doing with their SDK and their product development model. They have a different approach to their products. They release what they can and need to in order to ensure functionality. This is contrary to Windows and others who release crap for everything all on the same day and then have a lot of people pissed off with things not working. It is the quality of their products that has been a corner stone in their success in the market.
Opening up the iPhone like this is going to mess that their perception of quality in the market and that is probably one of their most valuable selling points.
Re:Apple's stance (Score:5, Interesting)
Re: (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:Apple's stance (Score:5, Informative)
P.S. The Apple SDK is actually quite nice. Compared to the standard Java API it's a fucking masterpiece of computer programming.
Re:Apple's stance (Score:5, Insightful)
The only part of the Java API that is worse than the Apple SDK is the GUI part. If Sun completely threw out Swing and started again from scratch (or Mac Java developers used Rococoa [java.net]) it would be brilliant. Java's support for everything else-- from multithreading to data structures-- makes Objective-C look like the 30-year-old grampa it is.
And Java is extremely fast-- almost certainly faster than Objective-C, which suffers from the worst of both worlds in performance: static compilation and extremely dynamic linking. These days, dynamic compilation (which has available to it runtime and usage statistics) can optimize much more efficiently than static, leading to higher performance code. And Objective-C's extreme approach to dynamic linking means almost nothing can be inlined or statically optimized across message/function boundaries.
Finally, the iPhone/Touch has some specific hardware to help make Java fast. Apple's just ignoring it. But Java on the iPhone using Apple's GUI library would be extremely cool.
Re:Apple's stance (Score:5, Informative)
OK I'll bite == Keep in mind I am more familiar with Java than Obj-C but here I go:
It is my understanding that Rococoa is a wrapper that allows Java to call Obj-C library routines. I guess this would put it in the same ballpark as IBM's GUI library.
I don't know what you are talking about here. All languages support data structures, and Obj-C is no different. I assume you mean built in library templates, and Java may have an edge here. I don't know how big the edge is, since personally I only use a subset of them and a lot of them are just there for legacy reasons. I would put this more in the realm of JavaSE/ME/EE the environment instead of Java the language. I'm sure it would only be a matter of time that Obj-C has a similar class library, if it isn't good enough already.
As for threading, Obj-C has an atomic attribute, @synchronized attribute, exception handling across threads, NSLock, NSRecursiveLock, NSConditionLock, and Semaphores. As for Java, you have the monitor attribute, synchronized, and event handling. I believe that both languages do adequately support threads. Both languages are subject to the limitation imposed by their host OS. Ok the JVM could perform multitasking in its own time slice, but boy would that suck...
I admit I only have written seriously multithreaded programs in Java (I have little demand for ObjC at the moment), but the Apple documentation seem pretty complete and ObjC has 20 more years of multithreading over Java (smile).
Anyway, I think I hit the crux of the problem being that I've had little demand for ObjC compared to Java. In fact, it is this demand that is forcing Apple to support Java. If the native SDK proves popular and the iPhone/iTouch marketshare continues to grow, I'll probably see less demand for Java and more demand for ObjC. This is what Sun is worried about, and this is the motivation for Sun to make a JVM for the iPhone.
You are the first person I have seen (outside of Sun) that has used "extremely fast" and "java" in the same sentence. Do you have references? I would like to read up on the architectural differences. Objective C can drop down to C, but let's face it the speed factor now-a-days is more academic than practical. To be fair, both languages run fast enough to give a good user experience. I always had my doubts on the effectiveness of benchmarks in arguments like these. I am more of a "the right tool for the job" kinda person. This right tool being, what ever you feel most comfortable programming in.
You are sorta right. The ARM 1176JZF does have built in hardware that is capable of running Java bytecode. It is a Software/Hardware solution called Jazelle. I don't know how easy it would be to incorporate its use into OS X lite. I know it's nice in an embedded JVM environment, but I have no clue on how well it would work in a mach environment. I'm thi
Re: (Score:3, Interesting)
Re: (Score:2)
Re: (Score:3, Informative)
Re: (Score:3)
I would take it as a personal task to destroy your code's behavior if there were any production impact on any bug. So, mister high-
Re: (Score:3, Insightful)
apple ships a jvm with OSX (Score:2)
Re: (Score:3, Interesting)
Javadoc (Score:3, Insightful)
It's not like Javadoc (or any other documentation tool) can magically create annotated code samples and training tools on its own. Don't blame Javadoc, blame the lazy bums who never bother to actually document their stuff.
Re: (Score:2, Interesting)
Re: (Score:2)
Comparing Windows JRE to OS X JRE, I think it would be a lot better port than Apple would ever provide. As Sun says "Once the capacity of devices are comparable to laptop, we will look for desktop java on mobile" or it is the general thinking, I wonder if iPhone being the only $100+ p
Re: (Score:2)
Guy said it is insecure and nobody asked for it. With apocalypse like "Taking down entire East Coast network". That is something you would expect from Ballmer but they got a very good $500M lesson for acting like that.
While doing the iPhone J2ME, I hope they use their Cocoa abilities to start
Re: (Score:2)
Re:Apple's stance (Score:5, Interesting)
Re:Apple's stance (Score:5, Insightful)
Others have offered reasons why Apple didn't bother with Java (such as wanting to maintain control or not liking its performance), but I think there's a much simpler reason: Apple's products succeed because they are polished. The graphic artists make sure everything looks nice, the UI designers spend time on special touches, and there is a lot of effort that goes into consistency and uniformity.
So, I think Apple didn't bother with Java simply because it didn't fit in with this. They have their own UI, and Java apps either won't look the same or will require a lot of effort to get there. That alone is enough to make Apple say "why bother?" when it already has one language that does the job.
Re: (Score:2)
Re:Apple's stance (Score:5, Informative)
Control (Score:5, Insightful)
Control.
Apple wants to control application access to the iPhone.
I've never been a huge fan of the iPhone, and Apple's continual foot-dragging over opening it up is getting increasingly old.
Re: (Score:2)
The iPhone already has two different APIs: Cocoa and Webkit. Until now, only the Webkit API was available, and now that they are releasing Cocoa they're releasing it under very tight controls and setting up extreme limitations in what Cocoa applications are going to be allowed to do... enforced by contract rather than software, but still limitations. One of those limitations is that third parties are not to provide their own interpreters (like Java). Apple i
Re: (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 BA
How do you figure it's "insecure"? (Score:2)
Unless you're talking about jailbreak? That's not a security hole, that's an advantage. I wish I could jailbreak my own cellphone, since Sprint has locked out most of the functionality tha
Re: (Score:2)
Do you know something more than I've been able to pull up, or were you talking through your hat?
Re: (Score:2)
iPhone is running things like UID 0, it was dreamed to be a completely closed platform and right after they saw people easily crack their protection, they opened it up to developers.
Java is running things in a sandbox since it was invented. Java applications can't see anything except their directory, J2ME/Symbian has plain English (or whatever language) basic questions like "Do you want to allow this applicat
Re: (Score:2)
cuz, lolz, it sure as heck wasn't designed with that use case in mind. At all. Shucks no.