Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
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.

-Lee
 

Monkaaay

macrumors 6502
Jun 19, 2006
258
0
Richmond, VA
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.
 

Sayer

macrumors 6502a
Jan 4, 2002
981
0
Austin, TX
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.
 

72930

Retired
May 16, 2006
9,060
4
No Java == loser phone

iphone-market-share.jpg


iPhone has no Java. Palm has Java. Palm=Loser in market share.
 

credit1

macrumors newbie
Original poster
Apr 1, 2008
6
0
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.

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.
 

cube

Suspended
May 10, 2004
17,011
4,973
I don't care about the primitive US phone market. There are a lot companies with J2ME applications for phones, not just smartphones.
 

credit1

macrumors newbie
Original poster
Apr 1, 2008
6
0
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.
 

cube

Suspended
May 10, 2004
17,011
4,973
BREW is a Qualcomm thing. The usual stuff in Phones is J2ME (restricted Java platform).
 

Sbrocket

macrumors 65816
Jun 3, 2007
1,250
0
/dev/null
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.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
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.

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.

If there was it would make the *Java* programmer's life much easier. HTML/Javascript and Objective-C/Cocoa are not more difficult than Java, but if Java is all you know and you don't wish to learn anything else, then you are in a tough spot in terms of iPhone development.

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.

-Lee
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.