Switcher Hangout The place for switchers to discuss their new machines, and how to work with OS X. General support can be had here for newbie stuff, like "How do I restart my new iMac?" :)

Setting up Java on OS X


Post Reply New Thread Subscribe

 
Thread Tools
EagleXC13

 
Member Since: Nov 02, 2009
Posts: 1
EagleXC13 is on a distinguished road

EagleXC13 is offline
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
QUOTE Thanks
technologist

 
Member Since: Mar 30, 2004
Location: USA
Posts: 4,744
technologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond repute
Mac Specs: 12" Apple PowerBook G4 (1.5GHz)

technologist is offline
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...)
QUOTE Thanks
ramenmeal

 
Member Since: Sep 30, 2008
Posts: 69
ramenmeal is an unknown at this point

ramenmeal is offline
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)
QUOTE Thanks

Post Reply New Thread Subscribe


« Help! Both mouse buttons are right-click | Better Macbook? 2.4 GHZ w/ 2GB RAM or 2.1 GHZ w/ 4GB RAM? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Headache error (Java) mister_montana Web Design and Hosting 1 03-26-2007 10:33 AM
weird java problem rerks OS X - Apps and Games 0 01-28-2007 05:59 AM
java question rerks OS X - Operating System 0 01-23-2007 03:05 AM
Uninstalling/Reinstalling Java msb86 OS X - Operating System 6 11-09-2006 11:20 AM
Java From Terminal jdgti OS X - Development and Darwin 10 03-26-2005 07:16 PM

All times are GMT -4. The time now is 11:32 AM.

Powered by vBulletin
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?