Mac How do i write java on a mac?

HomeingPigeon

macrumors regular
Original poster
Aug 1, 2007
227
0
For my class I will get extra credit if i can figure out how to write java and run java on a mac. I know it is possible and I hope that someone can tell me how they do it. The fewer things I have to download the better and the less money that it cost the better as well


thanks
 

Queso

Suspended
Mar 4, 2006
11,824
7
Have you installed the XCode tools? The Java Development apps are bundled with them. They aren't installed by default, but are on your OSX installation disks.
 

Eraserhead

macrumors G4
Nov 3, 2005
10,410
10,918
UK
If you have broadband its probably best to download the latest version of the developer tools with a free developers account on http://developer.apple.com/. Though the method dynamicv will work fine, and save you a 900MB download.

Once you have installed the developers tools. You can then compile with javac and run with java just like on Windows/Linux.
 

cjh

macrumors newbie
Oct 23, 2007
4
0
If you only need to prove that you can write, compile and run java on a Mac, then you can just use TextEdit to make your java source (set it up to use plain text instead of rich text), compile using javac, then run using java.

I don't recall if javac is installed with OS X or if you have to install it via developers tools (either off your OS X dvd or from the download mentioned above).

Alternatively, you can use XCode, also mentioned above, or other available IDEs for java available for Mac like Eclipse or NetBeans.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.