Results 1 to 10 of 10
  1. #1


    Member Since
    Sep 19, 2007
    Posts
    7
    Java Programming
    I'm in a beginning java programming class and I would like to be able to program on my mac.

    on a pc i make it in notepad, save it as something.java and then use the command prompt to compile and run it.

    On a mac i have no idea how to do it or if it is as easy. if anyone has experiance with doing this i'd be interested.

  2. #2

    Aptmunich's Avatar
    Member Since
    Mar 09, 2004
    Location
    Munich
    Posts
    9,073
    Specs:
    Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2
    Hey scrum! I'm in a similar course this semester!

    You can basically do exactly what you do on the PC:

    Open Textedit, go to the 'Format' menu and select make plain text, type your program, save it as 'program.java'.

    Then open the "terminal" (In applications> utilities) and type: "cd the location of your file". (hint, or type "cd " then drag in the file to have the terminal automatically fill in the path).

    Then type "javac program.java" to compile and "java program.java" to run it.


    That's the basics. If you want a nicer way of doing things, I can highly recommend Textmate. It has built-in systax highlighting, intelligently format your code and has special shortcuts for "compile & run" "complile and run in terminal" and the like.

    There are also a bunch of other text editors (Subethaedit is also nice) that have syntax highlighting...


  3. #3

    Wilcon's Avatar
    Member Since
    Oct 31, 2007
    Posts
    69
    Specs:
    Mac Pro Quad Core 2.66, ATI 1900, 5 GB RAM, 750 GB Storage
    Aptana is a free application for java editing and programming available from Apples site. You need Firefox for debugging but it seems to be very nice from the limited amount i have used it.
    There are 10 types of people in the world. Those who understand binary and those who don't.

    There are two types of IT problems in the world. PEBKAC and ID 10 T's.

  4. #4

    novicew's Avatar
    Member Since
    Jan 04, 2006
    Location
    Hamburg, Germany
    Posts
    1,385
    Specs:
    MacBook Pro | iMac(2.1 G5) | MacBook(2.16 C2D) | MacMini (1.67 CD) | iPhone 4 | iPad (3rd Gen)
    If you are looking for a GUI try Eclipse.

    I use Vim editor on Terminal for writing java programs. It is preinstalled in every Mac. To activate syntax highlighting, create a file called .vimrc on your users folder ~/ and type syntax on on it. Then save it and restart the Terminal. When you open a jave program next time, you should see all the color effects.

  5. #5


    Member Since
    Dec 24, 2006
    Location
    N. Ireland
    Posts
    901
    Specs:
    Mac Pro 2xQuad core 2.8GHZ
    Eclipse gets my vote.

  6. #6

    jdgti's Avatar
    Member Since
    Mar 14, 2005
    Location
    Atlanta, GA
    Posts
    443
    Specs:
    17" Macbook Pro Unibody 2.66 Ghz and Powerbook G4 1.67 GHz 2.0GB RAM
    Textmate owns. Not free though... Eclipse is nice if you want a real IDE.

  7. #7


    Member Since
    Mar 01, 2007
    Posts
    53
    netbeans here

  8. #8

    Aptmunich's Avatar
    Member Since
    Mar 09, 2004
    Location
    Munich
    Posts
    9,073
    Specs:
    Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2
    I find eclipse horribly slow... it's probably necessary when you start developing apps with multiple classes, but for simple stuff less is more

  9. #9

    knightlie's Avatar
    Member Since
    Mar 22, 2007
    Location
    UK
    Posts
    1,463
    Specs:
    Lenovo Z560 Hackintosh -:- '06 iMac -:- iPod Touch 2ndGen
    Netbeans is nice, and looks more like an Apple app. Eclipse is a bit slow.
    [URL="http://beadia.net"]Beadia[/URL - Jewelry Business Management Software]
    I judge you when you use poor grammar.

  10. #10


    Member Since
    Dec 24, 2006
    Location
    N. Ireland
    Posts
    901
    Specs:
    Mac Pro 2xQuad core 2.8GHZ
    Quote Originally Posted by knightlie View Post
    Netbeans is nice.
    But it's GUI builder produces horrible code

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Java Programming ?
    By V6Pony in forum OS X - Development and Darwin
    Replies: 7
    Last Post: 11-13-2013, 03:02 AM
  2. Java Programming - Help Please
    By JavaProgrammer in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 03-01-2012, 11:02 AM
  3. Taking screenshot with java applet using java robot class not working
    By sagngh8 in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 07-06-2011, 08:53 AM
  4. Java Programming at School
    By pr0wn3r in forum Web Design and Hosting
    Replies: 5
    Last Post: 11-25-2007, 10:35 PM
  5. Java programming
    By Conehead778 in forum OS X - Development and Darwin
    Replies: 5
    Last Post: 10-06-2006, 09:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •