New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

OS 10.4 - Java Programming


Post Reply New Thread Subscribe

 
Thread Tools
Scrum

 
Member Since: Sep 19, 2007
Posts: 7
Scrum is on a distinguished road

Scrum is offline
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
Aptmunich

 
Aptmunich's Avatar
 
Member Since: Mar 09, 2004
Location: Munich
Posts: 9,075
Aptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant future
Mac Specs: Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2

Aptmunich is offline
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
Wilcon

 
Wilcon's Avatar
 
Member Since: Oct 31, 2007
Posts: 69
Wilcon is an unknown at this point
Mac Specs: Mac Pro Quad Core 2.66, ATI 1900, 5 GB RAM, 750 GB Storage

Wilcon is offline
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.
QUOTE Thanks
novicew

 
novicew's Avatar
 
Member Since: Jan 04, 2006
Location: Hamburg, Germany
Posts: 1,385
novicew is a name known to allnovicew is a name known to allnovicew is a name known to allnovicew is a name known to allnovicew is a name known to allnovicew is a name known to allnovicew is a name known to all
Mac Specs: MacBook Pro | iMac(2.1 G5) | MacBook(2.16 C2D) | MacMini (1.67 CD) | iPhone 4 | iPad (3rd Gen)

novicew is offline
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
Del

 
Member Since: Dec 24, 2006
Location: N. Ireland
Posts: 901
Del has a spectacular aura about
Mac Specs: Mac Pro 2xQuad core 2.8GHZ

Del is offline
Eclipse gets my vote.
QUOTE Thanks
jdgti

 
jdgti's Avatar
 
Member Since: Mar 14, 2005
Location: Atlanta, GA
Posts: 444
jdgti will become famous soon enough
Mac Specs: 17" Macbook Pro Unibody 2.66 Ghz and Powerbook G4 1.67 GHz 2.0GB RAM

jdgti is offline
Textmate owns. Not free though... Eclipse is nice if you want a real IDE.
QUOTE Thanks
louiscy1

 
Member Since: Mar 01, 2007
Posts: 53
louiscy1 is on a distinguished road

louiscy1 is offline
netbeans here
QUOTE Thanks
Aptmunich

 
Aptmunich's Avatar
 
Member Since: Mar 09, 2004
Location: Munich
Posts: 9,075
Aptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant future
Mac Specs: Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2

Aptmunich is offline
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
knightlie

 
knightlie's Avatar
 
Member Since: Mar 22, 2007
Location: UK
Posts: 1,463
knightlie is just really niceknightlie is just really niceknightlie is just really niceknightlie is just really nice
Mac Specs: Lenovo Z560 Hackintosh -:- '06 iMac -:- iPod Touch 2ndGen

knightlie is offline
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.
QUOTE Thanks
Del

 
Member Since: Dec 24, 2006
Location: N. Ireland
Posts: 901
Del has a spectacular aura about
Mac Specs: Mac Pro 2xQuad core 2.8GHZ

Del is offline
Quote:
Originally Posted by knightlie View Post
Netbeans is nice.
But it's GUI builder produces horrible code
QUOTE Thanks

Post Reply New Thread Subscribe


« not sure if i have front row | Leopard hangs on screen turned off after some hours »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
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 02:33 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?