Slashdot Mirror


Sun Is Porting Java To the iPhone

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."

6 of 275 comments (clear)

  1. Apple's stance by NMajik · · Score: -1, Troll

    If Apple hasn't been proactive in trying to port Java to the iPhone I expect they must have a good reason, whether it be security or performance concerns. I really question how much of a blessing this independent push for porting is.

    1. Re:Apple's stance by Anonymous Coward · · Score: -1, Troll

      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) 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.

      Complete and utter bullshit and it's clear that you haven't looked at Objective-C in a long time. The standard Java APIs for date handling, collections, IO, NIO, Swing, RMI, XML and regular expressions are terrible. In fact, I bet you could pull up the Javadocs for the Java API and find ridiculous design decisions and a poor level of abstraction in practically every package. Sure, the APIs are powerful, but they're ten times more difficult to use than they need to be. Couple this with blatantly obvious deficiencies in the Java language and you have a programming environment that requires tons of unnecessary boilerplate code to accomplish anything significant. Scala or Clojure would be a significant improvement over the Java language, but we're not at the point where we can just pile on libraries on a portable device with limited resources.

      Objective-C also has the huge advantage that it's incredibly easy to drop back to C in performance critical sections. In Java, you'd probably use JNI which is one of the worst fucking FFIs in existence.

      And Java is extremely fast

      Yes, the JVM is fast once it's running. The problem being that the JVM still has a significant startup time and leaving the JVM running in the background all the time consumes a significant amount of resources and decreases the battery life. The JVM still isn't even a multi-tasking virtual machine...

      Apple's just ignoring it. But Java on the iPhone using Apple's GUI library would be extremely cool.

      The current version of Objective-C offers everything that Java offers without any of the disadvantages. There's absolutely no incentive for Apple to provide or support Java on the iPhone. Most people don't care about additional applications on the iPhone and barely anyone cares about Java applications in particular. If Apple really wanted to add support for a shitty programming languages with terrible APIs, they might as well go full out and choose COBOL.
  2. Waiting for Android by Anonymous Coward · · Score: -1, Troll

    Fuck the iPhone.

    All I have to say about that.

  3. Slow me down, java, slow me down... by Klaidas · · Score: 0, Troll

    I wonder how fast java's going to be on the iPhone... I mean, well, you know... java... speed... those two combined...

  4. Re:Not without a private agreement with Apple by robizzle · · Score: 0, Troll

    I'm all for free market competition and in the end I hope that Sun goes through with this and we get to see it all play out; however, a part of me feels like Apple developed the hardware, API, and SDK and should get their $99 + 30% if thats what they require. If consumers don't like this in the long run, they can go buy other phones.

    Either Apple is starting to see enough revenue that the business division is getting more swing within the company, OR, the engineers have some reason that they didn't want to bother trying to implement Java (performance, security, etc.)

    Personally, I'm holding my tongue for Silverlight with a custom set of iPhone controls (afterall, Microsoft said in MIX08 something along the lines of "We intend to port Silverlight to every mobile device that has an SDK")

  5. This is known as piggybacking by furball · · Score: 0, Troll

    Here's how it works:

    * Take something the press has forgotten about because it basically gets no press. Find a product that the press is buzzing about.
    * Somehow tie the thing the press has forgotten about to the hot new thing.
    * Remind the world your old forgotten thing is relevant and still exist.

    * Fade back to obscurity shortly thereafter.