Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 24, 2009, 05:57 AM   #1
Mac Rules
macrumors 6502
 
Join Date: Jul 2006
Location: London
Beginner's Java Development & Compiler

Hi guys,

Well I'm looking to start my Computer Science studies fairly soon and thought it would be a good idea to get a head start by getting some practice with Java. I've got a recommended textbook to learn from, now I just need some software to write on. Can anyone suggest a good SDK and compiler etc that could be used on Mac and on PC?

Cheers
Mac Rules is offline   0 Reply With Quote
Old Mar 24, 2009, 08:33 AM   #2
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
Dependent on the sort of Mac you have and the OS on it, you'll either use the Java 5 SDK or the Java 6 SDK that is provided by apple. I don't know if this comes preinstalled or if you need to install it from your OS DVD, but you should be able to find out pretty quickly by seeing what the output of javac is at the terminal. Javac is the compiler included with the SDK (they call it a JDK, i think). Otherwise you'd just need an editor and the terminal, compiling your classes with javac and running with java.

You can use XCode, Apple's IDE, for Java development. I haven't spent much time, but it seems to work fine the few times i've tried it. Eclipse is also available for OS X, which is one of the "preferred" IDEs for Java. Netbeans and others are available for OS X as well.

-Lee
lee1210 is offline   0 Reply With Quote
Old Mar 24, 2009, 10:49 AM   #3
Howiieque
macrumors regular
 
Join Date: Feb 2009
I asked something similar the other day. And people encouraged me to just use javac and java in the terminal instead of IDE. Just for beginner.

What textbook are you using?

And I have almost finished the Head First Java--a very good book whose author also used Mac for teaching Java. The author also think a beginner should not use IDE.
Howiieque is offline   0 Reply With Quote
Old Mar 24, 2009, 10:58 AM   #4
plinden
macrumors 68040
 
plinden's Avatar
 
Join Date: Apr 2004
For beginners and simple, single (or even just one or two) class programs, yes, it's a good idea to get used to using javac on the command line ... just to get an idea of what's happening underneath. Of course, it's not strictly necessary to know everything, but if you're serious about programming you'll be interested anyway, and you'll be a better programmer at the end.

When you start getting into collaborating with others on complex programs, I'd recommend trying out Eclipse or Netbeans ... both free IDEs that work well on OS X. Which one you prefer is a matter of choice. I wouldn't use XCode.
plinden is offline   0 Reply With Quote
Old Mar 25, 2009, 09:28 AM   #5
Mac Rules
Thread Starter
macrumors 6502
 
Join Date: Jul 2006
Location: London
Thanks for the replies guys, do any of these work with PC as I'll need to use the SDK on both Vista and OS X (and potentially Linux, but that's not important right now). I believe I'm right in assuming that javac is just a compiler, but is there any particular software I need to actually 'write' the programs?

Thanks again
Mac Rules is offline   0 Reply With Quote
Old Mar 25, 2009, 10:04 AM   #6
eddietr
macrumors 6502a
 
Join Date: Oct 2006
Location: Virginia
Quote:
Originally Posted by Mac Rules View Post
Thanks for the replies guys, do any of these work with PC as I'll need to use the SDK on both Vista and OS X (and potentially Linux, but that's not important right now). I believe I'm right in assuming that javac is just a compiler, but is there any particular software I need to actually 'write' the programs?

Thanks again
javac is javac on any of those platforms. There is also gcj, but use of that is limited and I wouldn't recommend it for someone learning java. Especially since javac is freely and easily available.

And ant is a very common build tool that is also easily available for windows, linux, and OS X.

And a good editor of your choice + javac + ant + java (of course) is all you really *need* to write code.

But if you prefer to use an IDE, then things like Eclipse (my choice) or Netbeans will run perfectly well on windows, linux and the Mac with the same interface on all 3.

Hope that helps.
eddietr is offline   0 Reply With Quote
Old Mar 25, 2009, 10:16 AM   #7
Mac Rules
Thread Starter
macrumors 6502
 
Join Date: Jul 2006
Location: London
Quote:
Originally Posted by eddietr View Post
javac is javac on any of those platforms. There is also gcj, but use of that is limited and I wouldn't recommend it for someone learning java. Especially since javac is freely and easily available.

And ant is a very common build tool that is also easily available for windows, linux, and OS X.

And a good editor of your choice + javac + ant + java (of course) is all you really *need* to write code.

But if you prefer to use an IDE, then things like Eclipse (my choice) or Netbeans will run perfectly well on windows, linux and the Mac with the same interface on all 3.

Hope that helps.
Thanks for that, I have stumbled across Netbeans on my Google hunts, do you think this would be a suitable environment to learn and progress well in? I'll have a look at Eclipse too.

Thanks
Mac Rules is offline   0 Reply With Quote
Old Mar 25, 2009, 10:31 AM   #8
wrldwzrd89
macrumors G4
 
wrldwzrd89's Avatar
 
Join Date: Jun 2003
Location: Solon, OH
I use NetBeans myself. It's a wonderful IDE for development, and it's cross-platform too. However, if you're just learning you may find its features a bit confusing.
__________________
iMac Intel (Rev H, 27"), 1TB HDD, 16GB RAM, 10.8.4
wrldwzrd89 is offline   0 Reply With Quote
Old Mar 25, 2009, 10:40 AM   #9
eddietr
macrumors 6502a
 
Join Date: Oct 2006
Location: Virginia
Quote:
Originally Posted by Mac Rules View Post
Thanks for that, I have stumbled across Netbeans on my Google hunts, do you think this would be a suitable environment to learn and progress well in? I'll have a look at Eclipse too.

Thanks
Can't really comment on Netbeans since I've used it maybe once. I use Eclipse.
eddietr is offline   0 Reply With Quote
Old Mar 25, 2009, 10:47 AM   #10
ChrisA
macrumors G4
 
Join Date: Jan 2006
Location: Redondo Beach, California
Quote:
Originally Posted by Mac Rules View Post
Hi guys,

Well I'm looking to start my Computer Science studies fairly soon and thought it would be a good idea to get a head start by getting some practice with Java. I've got a recommended textbook to learn from, now I just need some software to write on. Can anyone suggest a good SDK and compiler etc that could be used on Mac and on PC?

Cheers
Get the JDK from sun at "sun.com" and write some command line programs in the terminal. After a while you can go back to Sun and get NetBeans IDE.

About NetBeans vs. Eclipse... Use the terminal at first. You don't need an IDE. The need to learn Java first all of the IDEs are are complex and of no help unless you know Java. Just use the terminal and write some simple programs.

Netbeans comes from Sun and I think Eclipse came out of IBM. Both are big Java proponents. Either will work for you. But later. You don't want either of them now.

There are others but if you are going to learn to use something it may as well be the "Standard issue" product straight off the Sun web site.

Here is the link http://java.sun.com/javase/downloads/index.jsp

This link is good also http://java.sun.com/new2java/

Last edited by ChrisA; Mar 25, 2009 at 10:59 AM.
ChrisA is offline   0 Reply With Quote
Old Mar 25, 2009, 11:32 AM   #11
Cromulent
macrumors 603
 
Cromulent's Avatar
 
Join Date: Oct 2006
Location: The Land of Hope and Glory
Quote:
Originally Posted by ChrisA View Post
Get the JDK from sun at "sun.com" and write some command line programs in the terminal. After a while you can go back to Sun and get NetBeans IDE.

About NetBeans vs. Eclipse... Use the terminal at first. You don't need an IDE. The need to learn Java first all of the IDEs are are complex and of no help unless you know Java. Just use the terminal and write some simple programs.

Netbeans comes from Sun and I think Eclipse came out of IBM. Both are big Java proponents. Either will work for you. But later. You don't want either of them now.

There are others but if you are going to learn to use something it may as well be the "Standard issue" product straight off the Sun web site.

Here is the link http://java.sun.com/javase/downloads/index.jsp

This link is good also http://java.sun.com/new2java/
Just a small correction you actually install the Java development kit for Mac OS X by installing Xcode. Sun do not release a version for Mac OS X themselves. The same is true of the runtime which you should make sure is fully up to date by running Software update.
__________________
Neural Advance - Mac OS X, UNIX and Windows Development
Last.fm Profile | Extreme Metal Reviews
MP 4x 2.66Ghz Xeons / 6GB RAM / 640GB + 500GB + 750GB + 1TB HDDs / ATI Radeon 4870 / iPad 3

Last edited by Cromulent; Mar 25, 2009 at 11:48 AM.
Cromulent is offline   0 Reply With Quote
Old Mar 25, 2009, 11:41 AM   #12
iShater
macrumors Demi-God
 
iShater's Avatar
 
Join Date: Aug 2002
Location: Chicagoland
HF Java is a great book as you have noted. Make sure that when you go through it, you do ALL the exercises.

Use the command line to compile and run to get used to it. Use TextEdit or TextWrangler as editors.

When you are ready to get into IDEs, avoid XCode and go with Eclipse and NetBeans.

Another good book is Learning Java from O'Reilly.

They key is, practice practice practice. And don't use any WYSIWYG GUI (like NetBean's GUI editor), but code everything by hand.
__________________
Insert signature here.
iShater is offline   0 Reply With Quote
Old Mar 25, 2009, 02:33 PM   #13
wrldwzrd89
macrumors G4
 
wrldwzrd89's Avatar
 
Join Date: Jun 2003
Location: Solon, OH
Quote:
Originally Posted by iShater View Post
HF Java is a great book as you have noted. Make sure that when you go through it, you do ALL the exercises.

Use the command line to compile and run to get used to it. Use TextEdit or TextWrangler as editors.

When you are ready to get into IDEs, avoid XCode and go with Eclipse and NetBeans.

Another good book is Learning Java from O'Reilly.

They key is, practice practice practice. And don't use any WYSIWYG GUI (like NetBean's GUI editor), but code everything by hand.
Totally agree with this advice - that's exactly how I learned Java, and what I continue to do to this day.
__________________
iMac Intel (Rev H, 27"), 1TB HDD, 16GB RAM, 10.8.4
wrldwzrd89 is offline   0 Reply With Quote
Old Mar 25, 2009, 09:43 PM   #14
rev316
macrumors regular
 
Join Date: Nov 2004
Eclipse.

Widely used de-facto standard for Java (well, most?) and it'll carry other languages as well. It's both an academic and professional powerhouse in software development.
rev316 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Java backend development for iOS apps? MacMan988 iPhone/iPad Programming 5 Jun 10, 2014 12:11 PM
What Do You Recommend as a rMBP Configuration for Beginner Web/Software Development? thomj MacBook Pro 13 Oct 25, 2013 04:49 PM
Making a Java compiler made in Java (HELP) Fraaaa Mac Programming 7 Feb 1, 2013 10:04 AM

Forum Jump

All times are GMT -5. The time now is 07:25 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC