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

RaptorJesus

macrumors newbie
Original poster
Jul 14, 2008
16
0
So I picked up "Head First: Java" and am trying to learn how to write it. What ive gathered so far is that Leopard has Java already installed on it, ok. Now what program should I write the code in, which compiler should I use? If Java is already installed on my computer, where is it? Ive looked in spotlight and the only viable options I find are Java Webstart, andJava Preferences... neither of which appear to be a compiler.

Help!
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
The most basic, from the terminal, is javac to compile and java to run.

Java is one of the few languages I actually think is better to learn with an IDE than without, though. Netbeans is quite good. Eclipse takes some getting used it, but is good as well.

-Lee
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
You can also use Xcode for Java if you already have it installed. Xcode is okay for Java so long as you don't need to design a user interface.

b e n
 

italiano40

macrumors 65816
Oct 7, 2007
1,080
0
NY
You can also use Xcode for Java if you already have it installed. Xcode is okay for Java so long as you don't need to design a user interface.

b e n

Xcode is great for java, for a GUI you can hand code it in Xcode, but if you want to program for a mac you need to know Cocoa, Java does touch the surfaces as a programing language on a mac
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
I always hand-code my Java user interfaces anyway - though I think having the option to auto-design it is very nice, it's not something I'll use.

That said, I add my vote for NetBeans - it's a great IDE. I used to use Eclipse but got fed up with some of its more annoying traits.
 

yeroen

macrumors 6502a
Mar 8, 2007
944
2
Cambridge, MA
I'll parrot what I've said on these forums a thousand times, but you should spend some time learning how to program away from the IDE. That means emacs/vim/TextMate and compiling with gcj in the terminal.

Don't ignore the Java IDE's however. For better or worse, the IDE is big part of Java 'culture'. In this case, I'll second the recommendation for NetBeans. I find it much cleaner than Eclipse. It also has some very nice inbuilt tutorials and documentation that will help you along as you learn.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.