How do i write java on a mac?

Discussion in 'Mac Programming' started by HomeingPigeon, Oct 23, 2007.

  1. HomeingPigeon macrumors regular

    Aug 1, 2007
    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

  2. Queso macrumors G4

    Mar 4, 2006
  3. HomeingPigeon thread starter macrumors regular

    Aug 1, 2007
    Yeah i know that it is built in but how do i access it and write it.
  4. Queso macrumors G4

    Mar 4, 2006
    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.
  5. Eraserhead macrumors G4


    Nov 3, 2005
    If you have broadband its probably best to download the latest version of the developer tools with a free developers account on 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.
  6. cjh macrumors newbie

    Oct 23, 2007
    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.

Share This Page