Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Java Programming Businesses Cellphones Apple

An Open-Source Java Port To iPhone? 148

An anonymous reader writes "With the first anniversary of open-source Java coming up November 13, a Sun official believes the project could bear a fruit much sought-after in the Java community: a Java port to the Apple iPhone. Apple has not released a version of Java capable of running on the popular device. But Sun's Terrence Barr, technical evangelist for the Java mobile and embedded community, believes Apple's plans to release an SDK for iPhone in early 2008 may result in the open-source phoneME version of Java ME winding up on iPhone."
This discussion has been archived. No new comments can be posted.

An Open-Source Java Port To iPhone?

Comments Filter:
  • by Templar ( 14386 ) on Saturday November 10, 2007 @12:59PM (#21307681) Homepage
    Apple can't even commit to Java 1.6 for OS X -- I think you're being a wee bit optimistic.
    • Apple & Java don't play nice anymore
      Ah... I know what you mean! Never dip your apple slices in your java! It doesn't taste as good as you may think.
    • Everyone calm down! Changes are Java 6 will be released in a couple of weeks time, since Apple always does a major Java update after a OS release, read this blog: http://stuffthathappens.com/blog/2007/10/28/os-x-java-definitive-timeline/ [stuffthathappens.com]
      • I guess thats one way to try and persude people to fork out for the upgrade. Unfortunately since many of them probablly won't anyone who develops in java and has OS-X as a target is probablly going to be stuck with 1.5.x for some time.

        Also it looks like that timeline is just speculation based on past behaviour not actual data from apple despite the title.

      • Re: (Score:3, Insightful)

        by ClassMyAss ( 976281 )
        I don't know that I can agree that everyone should just calm down - a lot of people moved their Java development over to OS X because Apple made a huge deal about what a fan-freaking-tastic platform OS X was to code Java on. But 11 months later than the Win/Lin release? Come on now...that kind of delay does not indicate that they are taking developers very seriously, especially since said developers have been explicit ever since the ridiculous 1.4 delay about the fact that being up-to-date with Win/Lin is
    • Did you even read TFA? It says nowhere that Apple is doing a Java port to the iPhone, but that a Sun developer expects the community to do an independent port.
      • How would you load this port on the iPhone though? It's a closed platform. Even if Apple releases a 3rd party SDK in February, I guarantee you they'll do some stupid like require that developers submit binaries to be signed to Apple and users will need to download applications from the iTunes store for a low-low-low convenient fee for maintaining the signatures and bandwidth for serving up the applications. Something nice and round like $4.99 for a "freeware" app hosting and then perhaps off developers t
      • Did you even read TFA?

        You must be new here.
    • An anonymous reader writes "With the first anniversary of open-source Java coming up November 13, a Sun official believes the project could bear a fruit much sought-after in the Java community: a Java port to the Apple iPhone. Apple has not released a version of Java capable of running on the popular device. But Sun's Terrence Barr, technical evangelist for the Java mobile and embedded community, believes Apple's plans to release an SDK for iPhone in early 2008 may result in the open-source phoneME version of Java ME winding up on iPhone."

      He sounds like pro-liberal-religious official...

      Apple can't even commit to Java 1.6 for OS X -- I think you're being a wee bit optimistic.

      And you sound like fundamentalist religious counselor. "stick to java 1.4 because it came with OS X"
      just kidin' :)....nahh i'm serious. it's about friggin time when apple buys Sun.

  • I can't tell whether it was Apple's intention from the beginning to deliver the SDK for 3rd party development or if that's something that happened in response to industry-wide criticism, but either way, it is crucial to the acceptance of the iPhone for large business. A port of Java is icing on the cake, although that may become more important with time.

    Speaking of being ready for business, the rhetoric across just about all media is that the Mac is a great computer for home use but isn't ready for business

    • Depends what your business is. Some of the software I use daily is Windows only. Some of it is IE only. Some of it is IE 6 + .NET 1.0.2 only.
  • by maggard ( 5579 ) <michael@michaelmaggard.com> on Saturday November 10, 2007 @01:05PM (#21307737) Homepage Journal

    A few years ago Apple was all over Java.

    Apple rewrote their WebObject platform into Java. They built bindings into MacOS 10.3 making Java apps 'native', heck spent serious resources Aqua-fying Java to look native.

    So now there are a coupla Mac apps that are actually Java.

    But the bindings have been depreciated. And Apple is getting slower & slower about releasing Java updates. All the while additional toolsets are getting added, receiving support, etc.

    Then there's the iPhone, which Apple has made clear they've little interest in adding Java to.

    So does Apple perceive Java as moving into the also-ran category? Something that isn't gonna pay off development & support effort as a major player on the desktop? What makes it inappropriate for the iPhone?

    Are there any Java-on-Mac developers willing to share their insights? Folks who actually use it, pay attention to it on an ongoing basis, etc.?

    • by mccalli ( 323026 ) on Saturday November 10, 2007 @01:17PM (#21307855) Homepage
      So does Apple perceive Java as moving into the also-ran category? Something that isn't gonna pay off development & support effort as a major player on the desktop? What makes it inappropriate for the iPhone?

      I believe that's their perception, yes. I believe it's wrong too.

      Are there any Java-on-Mac developers willing to share their insights? Folks who actually use it, pay attention to it on an ongoing basis, etc.?

      Sort of - allow me to pontificate for a moment please.

      I develop a lot of Java code, but it typically gets deployed on other platforms other than the Mac. It's a mix of desktop and server-side, and it's for internal apps only.

      I would like to develop this using my Mac - it's not that I will unleash a mass of Mac Java apps on the world (though I have unleashed one), it's more that it allows me to pick the Mac as my daily working tool. I believe Apple have underestimated the demand for Macs amongst the more technical crowd, and I am hopeful of an OpenJDK port to OS X to take this worry away.

      To summarise: perhaps Apple are right about desktop apps in Java on their platform. I still believe they're wrong in the general case though, and that they should still either keep up with the JDK or just help with the port to the OpenJDK and let others keep up for them.

      Cheers,
      Ian
      • Tit for tat (Score:4, Interesting)

        by 2nd Post! ( 213333 ) <gundbear@p[ ]ell.net ['acb' in gap]> on Saturday November 10, 2007 @04:36PM (#21309033) Homepage
        I bet some bad blood exists because Sun has taken so long to port OpenOffice to native Mac status. By the time they finish, Apple will have a full fledged office competitor themselves in iWork!

        So essentially because Sun has decided Apple is not worth the resources to support OpenOffice on the Mac, Apple has decided Sun is not worth the resources to support Java on the Mac.
      • by maggard ( 5579 )

        Thanks - yours is exactly the sort of viewpoint I was hoping to hear from - real life tool users, not armchair zealots.

        So in your opinion an up-to-date JDK is what you require, and could live without OS hooks, native-GUI, etc.?

        Do you think the special Java bindings, native-GUI, etc. are worth the effort on Apple's part, or do you believe those would continue to be under-utilized?

        • Re: (Score:3, Interesting)

          by mccalli ( 323026 )
          Thanks - yours is exactly the sort of viewpoint I was hoping to hear from - real life tool users, not armchair zealots.

          No problem - hope you've got email notification on because I switched the machine of after making that post and missed your reply.

          So in your opinion an up-to-date JDK is what you require, and could live without OS hooks, native-GUI, etc.?

          Yes - that's exactly it. There will be some need for customisation, specifically the menu bar code on client-side, but that's already done and wor
      • I would like to develop this using my Mac...


        Exactly. Half, if not more, of the geeks in our local Java user group and design patterns study group carry around Mac laptops. I personally ported some native stuff to the Mac, just so I wouldn't have to develop on the company issued Dell laptop (piece of crap).

        Cheers, Jason Osgood / Seattle WA
    • by fermion ( 181285 )
      Let's look at this. Supporting the latest version of Java and binding it directly to MacOS is a development issue. It is not necessarily going to effect the Mac end user. Developers are expected to primarily use XCode. Not supporting the latest version of Java is simply going to mean that developers are not going to use macs, and Mac users are not going to be able to use the absolute latest software. To me this is bad, but Apple will do what Apple will do. Java is still available, and I,as an end user
      • by burris ( 122191 )
        Maybe they dropped it because nobody was using it. A massive development effort that could be used to improve the tools that Mac developers actually use. It's not like Windows app developers use Java either, so Apple isn't losing much in the way of cross platform apps (are there ANY popular apps for the mac written in Java other than Azureus?)

        Apple has done quite a bit to improve their development environment in Leopard, they aren't scorning third party developers at all on the Mac.

        • by Phroggy ( 441 )

          (are there ANY popular apps for the mac written in Java other than Azureus?)
          NeoOffice.
        • by jockm ( 233372 )
          LightZone [lightcrafts.com] A truly great photo editor (and based on Ansel Adams' zone system), is written primarily in Java (there is some native code for where Java can't fully meet native look and feel). It is a great example of an app that is written in Java. There are some others out there, but they don't make a big deal about being written in Java - they just are.

          Nor should they. I don't buy/use software based on what it is written in. I pick it based on how it does at the job in question. Most of the software I w
        • by maggard ( 5579 )

          ... are there ANY popular apps for the mac written in Java other than Azureus?

          Cyberduck [cyberduck.ch] is one I use regularly, a (s)ftp client, and it is indistinguishable from a Cocoa-based application. Indeed Cyberduck is a showcase [cyberduck.ch] of MacOS technologies: Spotlight, Bonjour, Keychain, Applescript, iDisk, drag-'n-drop, etc.

          I've always assumed there are vertical applications able to operate on the Mac because of Apple's Java support, much like other *nix-based code can be migrated without major (non-GUI) trauma.

    • 1st. There are really few desktop Java applications. Investments to port and support JDK/JRE/bindings are way too high.

      2nd. Java on iPhone. Java on mobile phones happened not because it was some advantage of Java over other technologies. It happened because industry didn't managed to come up with standard for interfaces. Many efforts defaulted. And Sun had seen that as market opportunity.

      3rd.

      So does Apple perceive Java as moving into the also-ran category?

      Absolutely. And who doesn't?

      In last f

    • Re: (Score:3, Insightful)

      by Blakey Rat ( 99501 )
      Speaking as a Macintosh user (and not a developer) Java does, and has always, sucked on Macintosh. I've yet to find a single Java app worth running, and it's only recently that Java applets on websites have actually worked without crashing the browser-- timely, now that most websites have ditched their Java applets.
    • Re: (Score:3, Interesting)

      Are there any Java-on-Mac developers willing to share their insights? Folks who actually use it, pay attention to it on an ongoing basis, etc.?

      I'm a professional Java-head, and I use a Mac most of the time. But if this shit keeps up, I might have to switch to Linux for my work (certainly not Windows, and probably not Solaris either).

      The stuff I write is mainly server code that gets deployed on *nix boxes. (Which I think is Java's real strength - desktop Java apps and web applets seemed like a good idea at one point, but they're a lost cause.) I don't deal with the Java GUI libraries much, and I'm not particularly interested in the iPhone. I just

  • by Diomidis Spinellis ( 661697 ) on Saturday November 10, 2007 @01:14PM (#21307823) Homepage
    While an open source Java port would be an interesting development, the real issue is whether Apple is interested to support Java on its platforms. A recent Javalobby article [javalobby.org], titled So Long Apple. The Party's Over, gives several arguments supporting the position that Apple is doing a lot less than what it should in order to properly support Java. A high-quality implementation of the Java virtual machine needs all the help it can get from the underlying platform. For an illustration of this, see how slickly Java runs on Sun's Solaris. If Apple isn't interested to put its weight behind Java, it's unlikely that Sun will fill this role. Sun is putting a lot of effort to tune Java on the Windows platform; I doubt they have the resources and motivation to do the same with Apple's platform, due to the significantly lower market share of Mac OS X. So, while an open source port of Java is nice, full-hearted support from Apple would be a lot better.
    • An enterprising developer is already working to get FreeBSD's Java 6 on Leopard:

      http://www.theserverside.com/blogs/thread.tss?thread_id=47500 [theserverside.com]
      • Re: (Score:1, Interesting)

        by Anonymous Coward
        Don't you think it's totally sad that an organization staffed by volunteers can port 1.6 before a multi-billion dollar company like Apple?

        Why even bother with them? They're obviously not interested and anyway you'd have to work around Leopard's extensive catalog of bugs to get Java running.
        • I really don't think that this particular Java port will run on OSX without X11.
          • Nope, someone would have to write a peer in Cocoa for each AWT component.

            [Disclaimer: I haven't owned a Mac since the 68k days, my casual interest is solely as a developer wishing to deploy to 1.6 for education.]

            The task is theoretically doable for a Cocoa developer but a non-trivial task requiring many man hours. But most Cocoa developers would be in paid employment writing innovative OS X applications, so it's doubtful sufficient numbers would volunteer their time supporting 'the enemy' - i.e. a rival

    • Are iPhone users really that interested in Java? Given that it's an interpreted environment, I question its efficiency. That speed and efficiency loss is not that critical on a desktop, but when you get a palm-sized computer, it can become an issue.

      Personally, I would rather make a native app just for iPhone than do a Java app for iPhone. iPhone really doesn't have a market fragmentation issue, it's its own segment. Given how fragmented the phone market is, a Java app would be better as a whole, but I r
      • by chromatic ( 9471 )

        Are iPhone users really that interested in Java? Given that it's an interpreted environment, I question its efficiency.

        I don't see why it's necessarily inefficient. I wouldn't expect a phone application to perform a lot of number crunching (except for media decoding), so the kinds of apps developed for a phone are likely either network or UI bound, if not both. It doesn't really matter what language you use when your app spends most of its time blocking.

      • Are iPhone users really that interested in Java? Given that it's an interpreted environment, I question its efficiency.


        Considering that iPhone users consider the phone's web browser to be an acceptable way to write iPhone apps [37signals.com], I highly doubt efficiency is the reason for their lack of interest.

        • by Trinn ( 523103 )
          most iPhone users do not consider the web an acceptable way to write apps (except for just a very few things already appropriate for the web), its just that apple hasn't allowed anything else *yet*, so we're stuck with either a (very good these days) third party created "hack" to allow native code, or the webapps
    • Jobs has said in interviews that he sees the software industry moving away from Java, and towards such things as web (Ajax) and Flash apps. So, the question isn't whether Apple is interested, but whether S.Jobs will listen to those that are interested in Java. 5 years ago there was no question, Java was better on OS X & PPC than any other platform... but Steve lost interest, and developers that moved to Mac are now abandoning it because of this attitude apparently cuminating in no plans for Java 6 on L
  • by wzinc ( 612701 )
    Well, since the iPhone is running a scaled-down OSX, maybe they could go all the way and port J2SE to it...
  • Don't get me wrong - Java SHOULD have been on the iPhone and its almost nothing but a positive thing...

    BUT... Since Java hasn't been an option, people have been writing and porting native applications to the iPhone, even without the SDK.

    Assuming we can all agree that usually native > Java, so I'm afraid this may lower the overall quality of available apps. Understandably, developers don't want to write native applications for every single device. Let's be honest though - Java is a shortcut - and pr
    • Say what you want on swing in general java desktop applications but javaME really is sweet.

      Google maps load in seconds on my cell phone with its tiny 200 mhz processor. I imagine with the more powerful Iphone that javaME would run quite well.

      Java really is not that bad for server and micro apps.
    • Re: (Score:3, Insightful)

      by quanticle ( 843097 )

      Not having the option of writing apps in Java equals more native apps

      No. You forget that there's a third option - not releasing the app for the iPhone at all. Without a Java interpreter, application providers may decide that the marketshare of the iPhone is too small compared with the marketshare of phones that support Java, and decide not to release their applications for the iPhone. In other words, not having Java apps equals fewer apps, not more native apps.

    • by Dahamma ( 304068 )
      Let's be honest though - Java is a shortcut - and primary reason anyone chooses to develop with it is portability and portability alone...

      Hmm, I would strongly disagree. Portability is a factor, but ease of development and security are huge factors for Java on a cell phone (or any platform!) Would you allow any native application/ActiveX control to run in your web browser?
  • It all depends (Score:5, Insightful)

    by 0xdeadbeef ( 28836 ) on Saturday November 10, 2007 @01:53PM (#21308091) Homepage Journal
    Will the iPhone's SDK be open, or will it be closed?

    Java is a hole in the "security" of devices, in that it allows the execution of arbitrary code outside of the device's native "security model". And I use scare quotes because by security, they really mean control, and by security model, they mean control over who is or isn't allowed to produce software for the device, and run software on the device. If the Java runtime were trusted, then every Java application has the same rights as the Java runtime.

    But Java has also been used by those who are legitimately concerned about security, because the virtual machine does actually make the execution of injected code very difficult. And by supporting the runtime natively, it actually gives you better control over what executes and who can execute it.

    But that makes it easier to limit the features available on the devices, so you can claim to support third party software and still put up an impenetrable wall between applications and the useful, built-in capabilities that the carriers want to trick customers into believing are special "services" they must pay more for. Bluetooth, GPS, camera, and even networking have found their APIs stripped from Java on certain carriers' devices.

    If Apple produces an open SDK, then putting Java on the iPhone is simple matter of porting it. Apple doesn't even need to be involved.

    But if Apple uses code signing to control who is and isn't allowed to release software for it, you can forget Java ever appearing, because then anyone could write software for it. They don't seem to be at all interested in supporting Java themselves.
    • It may be bad form to reply to ones own comment, but I'm shocked no one has mentioned Android yet.

      The reason Java has such a bad reputation on mobile devices is because the applications tend to suck or tend to be toys, and most of them are both. There is nothing wrong with Java itself. The problem is that MIDP is damn near useless for doing anything important. The controls look like ass, the base system is crippled, and you can't trust that the JSRs you require are on all the devices you want to support.

      And
    • Re: (Score:1, Insightful)

      by Anonymous Coward
      If the Java runtime were trusted, then every Java application has the same rights as the Java runtime.

      This is FUD, complete and utter rubbish. JVM provides very fine grained control of what code running inside it can and cannot do. That includes file, network and peripheral access. That stuff was in Java since day one, wake up and smell coffee.

      Google 'Java security manager' or 'Java sandbox'. This can be done on per application basis, you can have more and less trusted apps running at the same time with dif
      • LOL. Someone fails at reading comprehension.

        Java privileges don't mean jack if the underlying platform is hostile to Java to begin with. Your runtime won't have the capabilities to limit.
  • by rpp3po ( 641313 ) on Saturday November 10, 2007 @02:26PM (#21308303)

    It's very questionable that they would even extend their Java efforts for the iPhone when Java support by Apple for Mac OS X might soon be over, but continued by Sun.

    Main argument: Kernel APIs are stable since OS X 10.4, all major high performance graphic foundations since 10.5. The JDK could be put almost completely onto public APIs so Sun could take over development without the need for so much insider involvement anymore.

    I've found the whole story here: http://javablasphemy.blogspot.com/ [blogspot.com] (currently overloaded)

    • That post looks like it is complete speculation. Do you have any evidence to the contary?

      • by rpp3po ( 641313 )

        That post looks like it is complete speculation. Do you have any evidence to the contary?

        I've cited an anonymous blog, duh! What could be more credible?

        In the end it's just a sequence of bytes that you feel more comfortable about than other sequences of bytes. At some point in time, after you could connect it to some beliefs of yourself (like "bytes from msnbc.com always carry true facts"), you are suddenly willing to call a sequence 'evidence'.

  • This is so transparent.

    This has *NOTHING* to do with any Java anniversary.

    This is about competition, and that is good.

  • by radimvice ( 762083 ) on Saturday November 10, 2007 @05:22PM (#21309321) Homepage

    I'm a mobile phone game developer that has ported commercial games to over 200 handsets across all of the major Western carriers. This includes lots of crappy phones that could barely eke out 1fps, and lots of phones that hit 40-50fps without missing a beat. Overall though, I have a MUCH easier time porting for Java devices than for BREW [wikipedia.org], because Java is simply much easier to develop stable programs for, which means less bugs to waste time tracking down, which means you can make better quality software.

    And as far as Java being slow, bloated, etc., maybe all that was true back in the 90's, but today it's perfectly fine for development on any modern machine, all of our in-house development tools are written in Java and work perfectly. And J2me [wikipedia.org], the subset of Java that you find on the phones, is particularly lightweight and speedy - most mobile JVMs compile rather than interpret the Java bytecode, and some ARM cell phone processor architectures actually execute the straight J2me bytecode directly in hardware. What varies performance most is not usually the choice of Java vs BREW for running applications, but the speed of the phone's processor and its ability to paint to the screen quickly, and in my experience these vary regardless of whether a phone is using Java or BREW. A good Java phone will be entirely indistinguishable from, if not even more capable than, a good BREW phone in terms of its game-playing ability.

    If Java is ported to the iPhone, it would let existing game developers easily target their games for the iPhone during the standard porting process, and they could spend the extra time perfecting interfaces and controls to take best advantage of the iPhone's capabilities. This would mean an instant library of hundreds of quality commercial games each year, with a fast-growing library of independently-developed mobile games as well (that is, if AT&T grants its contract holders access to them). Otherwise, without a Java port it would mean a much more expensive porting process to a separate, proprietary SDK, which few mobile game companies with enough development resources will be able to profitably accomplish. So you'll probably get EA Tetris for your iPhone and little else, oh joy.

  • I don't know why people bother posting Java-related stories to Slashdot. Clearly the majority of its readers are still coding in Perl and have the nerve to suggest that Java's performance or UI is any slower or uglier than Perl. Please :)

    Secondly, it seems the majority of you are not aware of the fact that the vast majority of phones out there (~80%) runs JavaME. Pretty much every single one of you have been running Java applications for years on your phones without knowing it.

    Java isn't fast at everything,
    • We criticize it because, as a language, Java blows chunks. Its syntax and semantics come from C, which makes them good enough for many things, but it forces you to use object-orientation for absolutely everything.

      No, I will not use some obscure "design pattern" instead of commonsense language features like function pointers or truly global anythings or class pointers.
  • Im suprised this hasnt already been done.

"The great question... which I have not been able to answer... is, `What does woman want?'" -- Sigmund Freud

Working...