Setting up Java on OS X

Joined
Nov 2, 2009
Messages
1
Reaction score
0
Points
1
Hey

I'm used to using a Mac and I've done a lot of work with Java, but I can never seem to figure out how to configure Java IDEs on my Macs. I work with Windows at my school and I'm easily able to install and configure IDEs such as NetBeans, XCode, and JCreator, but when it comes to using my personal Black MacBook (OSX 10.5.8, 2.4 GHz, 2 GB) I get lost. I install the IDE, open it, and then try to build my programs and run them and it always tells me that it can't find where the Java code is on my computer.

I feel really stupid asking all of this, as I'm extremely computer literate, but this has evaded me for too long, so I need help.

Specifically, how do I route the IDE to find the JDK at a specific location (assume I'm using XCode, just for ease).

Thanks
Eagle
 
Joined
Mar 30, 2004
Messages
4,744
Reaction score
381
Points
83
Location
USA
Your Mac's Specs
12" Apple PowerBook G4 (1.5GHz)
You shouldn't have to "set up" Java at all. A JDK (actually, several) is included with OS X. By default, it's at
/System/Library/Frameworks/JavaVM.framework
On Leopard, the default is 1.5, but everything from 1.3 to 1.6 is installed.
Most every IDE will know this and require no configuration.

NetBeans will pick this right up. If you install it, Choose Tools > Java Platforms... and it will show you the default. If you click on Add Platform.... it will show you the others.
In Eclipse, open Preferences, and go to Java > Installed JREs.

(JCreator is Windows-only...which never really made sense to me...)
 
Joined
Sep 30, 2008
Messages
69
Reaction score
0
Points
6
what IDE are you using?

personally i think eclipse is the best available IDE for java programing on macs, net beans a lil behind. both of these will find the java JDK and necessary resources, as ^ said. However, as ^ said, there are a couple versions installed, so you may need to select which one from a drop down menu (at least this is how it is in eclipse)

DO NOT use xcode for java programming, simply because it really isn't meant for it and isn't maintained well (defaults with java 1.3 for compiling i believe)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top