Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Feb 15, 2008, 07:07 PM   #1
macrumors newbie
Join Date: Dec 2007
Is java still worth it to use on the mac?

After some time I was using obj-c and it was pretty good. I also wanted to see java as well because some examples some friends of mine did were amazing. I know obj-c takes a higher precedent than java in xcode with cocoa but is it still worth it to use java? I also heard about it being slow to update on the mac, is this true?

iamamthelawl is offline   0 Reply With Quote
Old Feb 16, 2008, 01:27 AM   #2
macrumors 6502
Join Date: May 2003
I'm not 100% sure what you mean by "worth it," but if your goal is to develop Cocoa apps, then Java is not for you. Apple used to have an official Java-Cocoa bridge, but it's been long since deprecated. ObjC, Python and Ruby are supported, but not Java.

And yes, Apple tends to lag Sun quite a bit in releasing updated Java versions. We still don't have Java 6, whereas it's been out for over a year elsewhere. Now that Java has been open sourced, hopefully projects like SoyLatte will be able to close that gap - but we're still a ways off from that.

Other than these issues, Java on Mac works pretty well. I guess it depends on what you want to do with it.
therevolution is offline   0 Reply With Quote
Old Feb 16, 2008, 04:35 AM   #3
macrumors 68040
elppa's Avatar
Join Date: Nov 2003
Java is a bit more of a modern language, for example it has had garbage collection from the get go, whereas this has just been added to Objective C.

If you want to do cross platform stuff then yes, Java is a good way of going about it. The main two bad things are:

[1] Performance: All the code is run on virtual machine which runs on top of the processor. The extent to which this is an issue varies on a case by case basis. This is less of an issue than it was and I certainly don't subscribe to the java = slow school of thought.

[2] Exploiting OS specific features. Fairly obvious: You can't use Core Animation in a Java app.

If you want to write OS X apps, then Cocoa is the way to go. You have the choice of three languages, which have already been outlined above.
elppa is offline   0 Reply With Quote
Old Feb 16, 2008, 07:49 AM   #4
macrumors 65816
Join Date: Jan 2008
What elppa said.

The only real reason to write a Mac program in Java is if you want it to be compatible with other operating systems or if Java is your preferred language and you really don't feel like learning a new one (which isn't a real reason, anyway). The reason your friends' examples of Java were "amazing" were a) they are probably more familiar with Java than you are with Objective-C and b) Java is a relatively easy language to learn where you can get a program up and running fairly quick.

If you want to program applications that will easily be cross-compatible with multiple operating systems, then Java is the way to go.

If you want to program the best OS X applications you can and want them to be as "Mac-like" as possible, but don't care if you can't use them in Windows, then Objective-C and Cocoa are what you really want to use.
kuwisdelu is offline   0 Reply With Quote
Old Feb 16, 2008, 09:56 AM   #5
macrumors 6502a
Join Date: Feb 2005
Location: The royal throne of kings, the sceptred isle, the other Eden, the fortress built
Another consideration is the large number of libraries available through Java.

I have ended up using Java for the large number of supporting libraries, especially when it comes to database connectivity. Of course, you can use c / c++ libraries if there is a native Mac implementation and you have the overhead of different programming models in a single project.
Join the army of the dead: http://www.urbandead.com
AlmostThere is offline   0 Reply With Quote
Old Feb 16, 2008, 01:29 PM   #6
macrumors regular
Join Date: Oct 2003
Location: Fort Thomas, KY
Java is both slow to be released on Macs and (anecdotally) slow to run on Macs. I have a top of the line MacPro, and a specific web-based Java app that I must use performs faster on WinXP running in Parallels on my MacPro than it does on the same machine is Mac OS X 10.5.2.
godrifle is offline   0 Reply With Quote
Old Feb 18, 2008, 11:38 AM   #7
macrumors newbie
Join Date: Sep 2007
I disagree that Java is slow on Mac. A memory hog, yes, but not slow. I worked in a VM environment for six weeks when Leopard broke jdk6 and while it's great to have the option to do so, it was fantastic to finally switch back to native java.

The real problem with java development on mac is that while most developers are looking forward to jdk7 and can even download nightly builds of jkd7, those of us on mac are still waiting for a proper jdk6 well over a year after its official release.

For that reason I don't recommend macs for java developers unless you're sure you don't require a current jdk.
bloomberg is offline   0 Reply With Quote
Old Feb 18, 2008, 03:21 PM   #8
macrumors 603
jeremy.king's Avatar
Join Date: Jul 2002
Location: Fox Lake, IL
I too wish Apple would either:

a) publish a full 1.6 release
b) get off their high horse and let the Open Source community run with it.
jeremy.king is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Some apps prompt to install Java 6 even when Java 7 is installed MacMan988 OS X Mavericks (10.9) 1 Apr 18, 2014 07:56 AM
Java 6 or Java 7 for OSX Mavericks for your Macbook Pro? Starfyre MacBook Pro 3 Dec 22, 2013 03:49 PM
Java 6.x security risk (?) vs Java 7.x and broken apps w/ v7.x installs? mgiamo Mac Basics and Help 1 Dec 15, 2013 03:48 PM
Chrome on OS X -- Java plugin / Java 7 vs Java 6 Issue booyahbooyah Mac Applications and Mac App Store 4 May 31, 2013 09:13 AM
Installed Java 7.07 but doesn't show up in Java preferences? -mattias- OS X 10.8 Mountain Lion 21 Aug 31, 2012 04:49 PM

Forum Jump

All times are GMT -5. The time now is 12:59 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC