Slashdot Mirror


Ex-Sun Employees Are Taking Java To iOS

An anonymous reader writes "Ex-Sun employees did what Sun/Oracle failed to do since the iPhone launched. They brought Java to iOS and other mobile devices. They are getting major coverage from Forbes, DDJ, hacker news and others. They are taking a unique approach of combining a Swing-like API with a open source and SaaS based solution."

33 of 115 comments (clear)

  1. Not entirely useful by medcalf · · Score: 5, Informative

    Just to be clear, this does not allow users to run Java apps on their phones. It makes it easier for Java developers to port Java apps, though.

    --
    -- Two men say they're Jesus. One of them must be wrong. - Dire Straits
    1. Re:Not entirely useful by binarylarry · · Score: 4, Insightful

      Why would you want a desktop app on a phone anyway?

      Except for certain very narrow use cases, it's better to have an app written for phones.

      --
      Mod me down, my New Earth Global Warmingist friends!
    2. Re:Not entirely useful by aaaaaaargh! · · Score: 4, Insightful

      There hundreds of thousand Java apps that are not desktop apps, like e.g. every Android app. So what's your point?

    3. Re:Not entirely useful by sl4shd0rk · · Score: 4, Insightful

      Why would you want a desktop app on a phone anyway?

      Java is a portability option (if you are mindful). You can write a single Java based application and run it on any platform supporting the version you compiled for. This gives you instant portability to other platforms without having to wonder about ended-ness, hardware, file structure and myriad other things. Imagine writing a game on Linux and automaticaly, it would run on Windows, Mac and any other Java supported platform.

      Now, all this ease does come at a cost. It takes an extra layer of software (java VM) and more CPU power and RAM than a native application but this is the tradeoff. If you are wise, you can get acceptable performance out of modern hardware.

      In reality, developers haven't always coded Java with portability in mind. Some platforms (won't mention any names) have been suspect of "hobbling" the stability of Java on purpose because said platform had their own implementation to market, but that's beside the point. Java portability is a keen aspect of the language which sometimes gets overlooked. It can offer some very real benefits under favorable circumstances but is by no means the end-all many would like. It has it's drawbacks too but the portability is a big one.

      --
      Join the Slashcott! Feb 10 thru Feb 17!
    4. Re:Not entirely useful by Anonymous Coward · · Score: 4, Informative

      It will work for android. Rather than trying to run Swing on the native platform, It compiles down to whatever the native platform is. Basically in C1 you are building a meta app using their libraries. Then when it compiles, for iOS it will generate Obj-C, for Android it will generate a UI using standard Android widgets (I know Android is java, but not sure what their UI framework is called).

      I'm a Java/iOS developer and have been playing around with it a bit. IMO, it has a long way to go before being useful, but it's exciting to see that what they are doing is possible. Currently their API is pretty sparse and their design tools are very primitive, so I think to match what a lot of apps are doing today, you would still end up writing a lot of native code. They have their own version of JNI that let's you do that.

      I think if they keep working on it though, create a cool UI builder, add more wrappers around more core platform services (location services would be a good one to add next I think) I think they will get there.

      It's neat stuff! I'm still going to do my iOS apps in Obj-C though for the time being.

    5. Re:Not entirely useful by gstoddart · · Score: 2

      Why would you want a desktop app on a phone anyway?

      I don't know about you, but my cell phones have had stuff on them for years that say "powered by Java" (which mostly I launch by accident, and then close after waiting for the damned thing to start up).

      Java is used for much more than just desktops. The Micro Edition has been around a long time.

      Many many phones have Java code on them.

      --
      Lost at C:>. Found at C.
    6. Re:Not entirely useful by Bogtha · · Score: 4, Informative

      Android applications aren't Java applications. They are written in the Java language, but they are then compiled to run on the Dalvik VM. Even if they were Java applications, you couldn't simply drop them onto any old Java VM and have them work; they need all the runtime libraries present on Android to work.

      --
      Bogtha Bogtha Bogtha
    7. Re:Not entirely useful by CosaNostra+Pizza+Inc · · Score: 2

      From what I see it makes it easier for Java minded devs to create apps that will compile natively to all platforms.

      This is why I love developing in Java.

    8. Re:Not entirely useful by DrXym · · Score: 2

      The problem is people don't want to port Java apps, they want to port Android apps. It's not much good supplying some API which is totally different to Android including the APIs that UIs are designed with. Basically it needs to be something which compiles Dalvik byte code into LLVM byte code and links with associated runtimes.

    9. Re:Not entirely useful by gl4ss · · Score: 2

      most of them

      I seriously doubt that is true. Do you have a reliable source that agrees that most Android apps use the NDK?

      If I had to pull a number out of my stetson(I do have one, I just never wear it) I'd say that 99% of android apps don't need ndk.

      however the probability that someone interested in games has some ndk app or another is nearly 99% as well(gta & etc cool tech demo type of things need it.. that's why you're seeing them ported to both ios and android but not wp currently).

      technically though this particular java solution is only of interest to developers, however it seems like it's more reasonable than phonegap for example - this approach could get much better actual cross platform compatibility for complex ui's.

      but still.. swing.. ugh..

      --
      world was created 5 seconds before this post as it is.
    10. Re:Not entirely useful by ArhcAngel · · Score: 2

      How many high performant apps have you seen written in Java

      I haven't seen many but the one I have seen is pretty darned impressive.

      --
      "A person is smart. People are dumb, panicky dangerous animals and you know it." - K
    11. Re:Not entirely useful by owlstead · · Score: 3, Interesting

      That is certainly true, but most of the libraries that are used for core functionality of applications (at least if your application is not just a GUI or Android specific) are fully compatible with the Java runtime after compilation, and almost any third party lib can be compiled and run. The only problem is that many applications are too dependent on the GUI - in other words if they are badly written.

  2. Swing like API? by HornWumpus · · Score: 3, Funny

    Is that any API that basically doesn't work?

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    1. Re:Swing like API? by GodfatherofSoul · · Score: 2

      Yeah, you don't know how to use it, so it must suck...

      --
      I swear to God...I swear to God! That is NOT how you treat your human!
  3. Re:Appcelerator? by pipeep · · Score: 2

    It's more-or-less the same approach, the notable thing is that this time it's Java.

  4. Java Stack Traces by doubleplusungodly · · Score: 5, Funny

    I hope iPhone users don't freak out when their Java apps suddenly start printing 500 line stack traces.

    --
    ---
    1. Re:Java Stack Traces by blackfrancis75 · · Score: 3, Insightful

      The fact that iDevice users in general aren't accustomed to error messages whatsoever brings up a philosophical question..
      If an App falls over and no one sees an error message, did it really fail?

  5. Tomorrows News: Oracle sues ex-employees.... by who_stole_my_kidneys · · Score: 2

    Im sure they will come up with something to sue them over, or if it gets big enough buy them out.

    1. Re:Tomorrows News: Oracle sues ex-employees.... by binarylarry · · Score: 2

      That's almost correct, except Larry Ellison prefers to dress up like a woman and hide behind his lawyers.

      And then hunt them like animals.

      --
      Mod me down, my New Earth Global Warmingist friends!
  6. cross platform by RockGrumbler · · Score: 2

    I'm always happy to see an attempt at making good cross platform frameworks. Good luck to the team.

  7. About time, more like by Zocalo · · Score: 2

    So, given that tablets run pretty much the same OSs (Android, iOS) as many phones, you'd consider the potential for touch-enabled versions of the large number of Java front-ends to client server/systems on tablet PCs to be a "narrow use case"? The key phrase in there is "SaaS". Don't just think front-ends to enterprise scale client/server database systems; think Google Apps, and the many other Cloud based applications that are no doubt going to be developed for the growing tablet market.

    --
    UNIX? They're not even circumcised! Savages!
  8. Re:No, thanks. by gbjbaanb · · Score: 4, Interesting

    Um.. you realize that every Android application is written in Java, and there are quite a few exceptional Android applications.

    I think you'd be surprised at how many of those are written using the NDK. Download addon detector and look for yourself (its an app typically used to check an app doesn't include some dodgy notification-based ad networks, but it also shows you a load of other interesting info). 80% of the games I have on my phone are NDK based, they're the ones that are responsive and fast.

  9. Judging from the video by ashpool7 · · Score: 2

    http://www.youtube.com/watch?v=lkPt3jDW8Bs

    It's just about as slow as a translated hack. DDJ reports that they draw all their UI elements from scratch, which would explain it.

    Granted, the video could be choppy because their recording software is bad or they intentionally slowed it down, but I've had an iPhone 3G (the demo is a faster 3GS) and my apps aren't this slow.

  10. Re:finally by LizardKing · · Score: 2

    I don't find Eclipse, NetBeans, SoapUI, Maple and Vuze to be jokes. In fact I use them every day and find them all to be "awesome".

  11. Separation of model and view by tepples · · Score: 3, Interesting

    Then write a Swing front-end, which runs on J2SE platforms, using the same application logic as your Android application. If your application's model and view are separated correctly, this shouldn't be hard.

  12. You can now by codepunk · · Score: 2

    You can now experience the same poor application performance and battery life of android devices. Download Now!

    --


    Got Code?
  13. Re:No, thanks. by oakgrove · · Score: 2

    I just ran Addon Detector agains all of the apps on my Xoom and you're right. Pretty much all of the well performing apps make use of the NDK. I just wonder what this means for platforms like FirefoxOS that rely on web technology for development.

    --
    The soylentnews experiment has been a dismal failure.
  14. Re:No, thanks. by Richard_at_work · · Score: 2

    I have used both side by side, and I dispute your claim - its smoother some of the time, its worse some of the time.

  15. Re:Why? by Richard_at_work · · Score: 2

    I've never had Java enabled in my browser - I've not noticed anything really missing from any websites I have ever visited. No big holes in the page, no missing functionality. Where are these wonderous hidden applets that you claim should be there?

  16. We already have the original by StefanWiesendanger · · Score: 2

    Java basically started out as a clone of OPENSTEP - i.e., the very system/API that is the ancestor of OS X and iOS or Cocoa and Cocoa Touch respectively. So, when I can have the matured original, why would I want the clone?

    1. Re:We already have the original by StefanWiesendanger · · Score: 2

      Well clone wasn't well formulated. It drew heavy inspiration from OPENSTEP and Objective-C, which at that time was used by Sun as well (OpenStep for Solaris) but then ditched in favour of Java. Let's put it that way. :)

    2. Re:We already have the original by stephanruby · · Score: 2

      Java basically started out as a clone of OPENSTEP - i.e., the very system/API that is the ancestor of OS X and iOS or Cocoa and Cocoa Touch respectively.

      You mean (Java) Swing "basically started out as a clone of OPENSTEP".

      So, when I can have the matured original, why would I want the clone?

      So you could use a language like Java and have things like Garbage Collection I assume. And yes, my sentiments exactly, why use a halfway started clone of SmallTalk like Objective C when you could use Java, which is a halfway finished slightly better clone of SmallTalk instead?

  17. Re:finally by Desler · · Score: 2

    So programs that are slow to start up, eat memory like crazy and are pretty laggy and unresponsive? Yep, typical Java 'awesomeness'.