Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Java Programming Businesses Cellphones Apple

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."
This discussion has been archived. No new comments can be posted.

Sun Is Porting Java To the iPhone

Comments Filter:
  • Re:Apple's stance (Score:5, Interesting)

    by croddy ( 659025 ) * on Saturday March 08, 2008 @02:33PM (#22687766)
    Sure, possibly security or performance. More likely, NIH [wikipedia.org].
  • by wal9001 ( 1041058 ) on Saturday March 08, 2008 @02:38PM (#22687802)
    Now that the Mac is overrun with terrible ports of Java apps with Windows interfaces and menus at the top of windows instead of in the menubar, we can send the iPhone down the same road! Horray for inefficient power wasting slow ports! But at least it's easy to go cross platform with Java, as long as you don't want it to look right or run fast. Ok, I'm a tad cynical. We can hope that iPhone users will demand a higher standard of usability than the "hey, I bet we could make this run on Macs with a few hours of work" that are fairly common in the software market. Otherwise it's going to be overrun with bad versions of apps thrown over from other java capable mobile platforms.
  • Re:Apple's stance (Score:2, Interesting)

    by da_matta ( 854422 ) on Saturday March 08, 2008 @02:43PM (#22687842)
    ...Or they thought it would be bad for business. Think about it, what's implied here is that Sun has only the publicly available information on feasibility of a JVM in iPhone. I.e. they've not had serious discussions about the JVM implementation (with or without the public SDK). Either Apple has not recognized the value of JVM in iPhone, or they see it as threat to them and are not pursuing it in purpose.
  • Re:Apple's stance (Score:5, Interesting)

    by Anonymous Coward on Saturday March 08, 2008 @02:48PM (#22687858)
    For one thing, if iPhone developers choose to just use Java, then the applications could run on other phones relatively easily.
  • by VGPowerlord ( 621254 ) on Saturday March 08, 2008 @02:49PM (#22687868)

    Now that the Mac is overrun with terrible ports of Java apps with Windows interfaces and menus at the top of windows instead of in the menuba

    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.
  • by Doc Ruby ( 173196 ) on Saturday March 08, 2008 @02:49PM (#22687876) Homepage Journal
    Java ME is already part of the default platform for DVB/ATSC (European / N American cableTV clients), most mobile phones, and Blu-Ray (so all HD videodiscs). When it's on the iPhone, JME will get high visibility as a development platform (DVB/ATSC/BD-J and even most mobile phone development is nearly all done by a small niche of developers).

    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)

    by BotnetZombie ( 1174935 ) on Saturday March 08, 2008 @02:54PM (#22687896)
    Not only that, maybe Apple has even known all along that they wouldn't have to do the work - Sun, or someone else would take care of it.
    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.
  • by wal9001 ( 1041058 ) on Saturday March 08, 2008 @03:00PM (#22687942)
    Well, they're not all that bad. It's mostly smaller projects, like PCGen that are the worst offenders, and some more widely used ones like Azureus never really got good Mac interfaces. For example, when you make the Azuerus window smaller, instead of adding a scrollbar it just covers stuff up bit by bit. So you can make it small, but if you want all of the statistics to be available you have to leave it at a fairly large size. Azureus's interface is the main reason that everyone I know has switched to Transmission.

    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.
  • by Anonymous Coward on Saturday March 08, 2008 @03:05PM (#22687968)
    Is java the best solution for Iphone? Seems like a step back, gluing feathers on an airplane.

    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.
  • by civilizedINTENSITY ( 45686 ) on Saturday March 08, 2008 @03:06PM (#22687976)
    Agreed that Java is preferred to Flash.

    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)

    by cbart387 ( 1192883 ) on Saturday March 08, 2008 @03:28PM (#22688090)
    May I recommend doxygen [stack.nl] for your documenting needs. Does what javadoc can do + more (can create 'call graphs', works on several languages, and outputs to html, pdf, manpages, rtf etc etc). It is truly an impressive piece of software.
  • Apple has every right to lock in the iPhone, yes, but that doesn't mean we have to go along with them.

    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, .NET, Silverlight, Moonlight, it's all the same vigorous viral ecosystem.
  • Re:Loss of Control (Score:2, Interesting)

    by erroneus ( 253617 ) on Saturday March 08, 2008 @04:32PM (#22688408) Homepage
    I got modded flamebait on a previous thread discussing Apple's intended singular point of control disallowing enterprise administrators the ability to install apps on the phones within their enterprise domain where at least three people (so far) said I simply didn't read the articles that Apple *will* in fact, allow such enterprise control.

    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)

    by bennini ( 800479 ) on Saturday March 08, 2008 @04:43PM (#22688472) Homepage
    sorry but you are wrong.

    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)

    by Ilgaz ( 86384 ) * on Saturday March 08, 2008 @05:56PM (#22688894) Homepage
    Security and Performance concerns? No, it is openness concerns. What is a meaning of iPhone software store if user can click a jad/jar file which is SECURELY signed from their browser and install it?

    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.

  • by shutdown -p now ( 807394 ) on Saturday March 08, 2008 @05:59PM (#22688914) Journal

    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.
    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.
  • thanks for the idea! (Score:3, Interesting)

    by SethJohnson ( 112166 ) on Saturday March 08, 2008 @07:24PM (#22689298) Homepage Journal


    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)

    by TheRaven64 ( 641858 ) on Saturday March 08, 2008 @08:13PM (#22689510) Journal
    The concurrency thing in the grandparent made me smile. I've implemented Futures in Objective-C and they can be used entirely transparently - just create the object with +threadedNew instead of +new (or +alloc -init) and you get a version that runs in a different thread, handles method calls asynchronously and returns a proxy object which just blocks when you try to access it until it's ready (or you can ask if it's ready), which is great for long-running worker tasks. This is not possible in Java because the static dispatch mechanism doesn't allow you to alter message delivery (method call) semantics.

    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.

  • by Serious Callers Only ( 1022605 ) on Saturday March 08, 2008 @08:26PM (#22689570)

    Of course I read your post.

    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.

    Your arguments didn't even recognize the points I made, that I just made again. My arguments addressed your points specifically.

    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.

    You don't have any good ideas, even when they're given to you over and over.

    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.

    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.

    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.

    once again proving you're not reading my posts, you don't notice the remote device UI use case I mentioned, which is of course just one possible application.

    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.

    iPhone Java is coming, bringing along...Just don't pretend that you're qualified to talk anyone out of it.

    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)

    by Anonymous Coward on Saturday March 08, 2008 @08:50PM (#22689640)
    No need to provide examples of the current version of Java being faster than the current version of Objective-C. One can prove it analytically.

    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.

I have hardly ever known a mathematician who was capable of reasoning. -- Plato

Working...