Separate names with a comma.
Discussion in 'Mac Programming' started by credit1, Apr 20, 2008.
I am wondering if iphone can run a java application?
The iPhone does not have a JDK. Applications must be written using Objective-C.
more important than a JDK, the iPhone has no JVM. It seems like if Apple gets its way, it will not. Sun said they would produce one, but there is a clause in Apple's guidelines that forbids programs that run other programs, interpret code/scripts, etc.
It would be nice to have a JDK just for the iPhone that provided access to native GUI controls and access to the hardware without devs having to make their own JNI to C/Objective-C bridge. It just seems unlikely.
Sorry. Pre-coffee reply. I meant JVM, not JDK.
As others have said, no. I wouldn't expect to see one either. If you have an understanding of Java I would say picking up Objective-C would be pretty easy.
Java's JVM would put additional stress on a limited hardware platform.
Phones don't run the full java platform, they run a scaled down version called BREW (Binary Runtime Environment for Wireless). iPhone is NOT a full platform analogous to a laptop or desktop. Its a mobile device, very limited RAM and processing power (due to literal battery power limits).
Since the iPhone is already limited in its UI and feature set, it doesn't make sense to try and shoe-horn an existing Java app onto the iPhone. Just make a new iPhone-specific version of your client app using Cocoa Touch.
BTW there are tons of existing Mac developers who wouldn't mind making an iPhone app in places like RentACoder.com.
No Java == loser phone
iPhone has no Java. Palm has Java. Palm=Loser in market share.
Are you sure it supports BREW? If if supports, then it should support the java application obeying BREW protocol same as on other mobile phone. That should be a good news.
I don't care about the primitive US phone market. There are a lot companies with J2ME applications for phones, not just smartphones.
Yes, I am thinking develop the J2ME application with limited modification and run on almost every mobile phones. Just wonder if iphone really support any kind of j2me/j2se program. Then programmer's life will be much easier.
Forget the iPhone.
This is a bit comical (sorry it’s at your expense). Read what he said again (emphasis mine).
I do the same thing sometimes.
BREW is a Qualcomm thing. The usual stuff in Phones is J2ME (restricted Java platform).
Java == loser programmers
While I wouldn't go that far even though I don't favor Java anymore (after using it for several years myself), you're wasting your time trying to get a Java application to work on the iPhone - J2ME or not.
There has been some confusion, so I will state again:
There is NO java on the iPhone. No BREW, no j2me, no j2se, none. There is no JVM, and the likelihood of there ever being one can only be based on whether you believe Sun or Apple.
Since Apple has a pretty firm grip on the official platform, I am betting on Apple's past remarks holding true. As such, I don't believe there will ever be Java on the iPhone.
I don't think this needs to be as contentious as it has become. Java is a valid language, as is Objective-C. The Java community is larger at the moment, but NeXTSTEP and Apple have championed Objective-C and the iPhone is Apple's baby.
Should it be "open"? That's another thread (and probably forum) entirely, and there is a community dedicated to unlocking the iPhone so you can run whatever you want on it. To access the hardware you still have to use Objective-C to make the calls, but using a jailbroken (etc.) phone, you could write bridges for other languages and program in them.
If you did choose to port a current Java program to Objective-C you could probably easily have it running on full OS X as well as the iPhone and iPod Touch. This may be of no interest whatsoever, but it might be a positive side effect.