| OS X - Operating System General OS operation information and support |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Sep 19, 2007
Posts: 7
![]() |
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. |
| QUOTE Thanks | |
![]() Member Since: Mar 09, 2004
Location: Munich
Posts: 9,075
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac 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...
|
| QUOTE Thanks | |
![]() Member Since: Oct 31, 2007
Posts: 69
![]() Mac Specs: Mac Pro Quad Core 2.66, ATI 1900, 5 GB RAM, 750 GB Storage
|
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. |
||||
| QUOTE Thanks | |||||
![]() Member Since: Jan 04, 2006
Location: Hamburg, Germany
Posts: 1,385
![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac 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. |
| QUOTE Thanks | |
![]() Member Since: Dec 24, 2006
Location: N. Ireland
Posts: 900
![]() Mac Specs: Mac Pro 2xQuad core 2.8GHZ
|
|
| QUOTE Thanks | |
![]() Member Since: Mar 14, 2005
Location: Atlanta, GA
Posts: 444
![]() Mac Specs: 17" Macbook Pro Unibody 2.66 Ghz and Powerbook G4 1.67 GHz 2.0GB RAM
|
|
| QUOTE Thanks | |
![]() Member Since: Mar 09, 2004
Location: Munich
Posts: 9,075
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac 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
|
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
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 |
| Java programming | Conehead778 | OS X - Development and Darwin | 5 | 10-06-2006 09:53 PM |
| 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 03:21 AM.
Powered by vBulletin