Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

frnak

macrumors member
Original poster
Oct 21, 2007
73
0
Hi there, I'm a 2nd year computer science university student who's starting to learn OOP by starting with java programming.

First of all, I am aware of of Eclipse, Netbeans, and IntelliJ for coding specifically for Java. However, Since I've become quite familiar with Xcode for C programming. I was wondering if it's possible to do strictly java coding/compiling/testing in Xcode 4.1 (newest version on Lion)


If so, can anyone tell me how to set Xcode up for java programming...say..for a simple Hello World program.

Much appreciated
 
Hi there, I'm a 2nd year computer science university student who's starting to learn OOP by starting with java programming.

First of all, I am aware of of Eclipse, Netbeans, and IntelliJ for coding specifically for Java. However, Since I've become quite familiar with Xcode for C programming. I was wondering if it's possible to do strictly java coding/compiling/testing in Xcode 4.1 (newest version on Lion)


If so, can anyone tell me how to set Xcode up for java programming...say..for a simple Hello World program.

Much appreciated

Technically, Apple has dropped support for Java with Xcode, so you can't create JAVA files with Xcode. I have tried to find a way to create JAVA files in Xcode, but it appears you just can't. However, Xcode can still open Java documents, but cannot run them. Eclipse is your best bet, but any other is fine too.
 
Seconded, there never really was any good reason to use Xcode for Java. Xcode's interface is great for Objective-C programs, but for anything else it doesn't really work all that well in my opinion. Download Eclipse, not only is it better suited towards Java development, there is a lot more documentation online for it as well.
 
I agree with the other posters that are better IDEs than Xcode for Java development. However, if you really want to use Xcode 4 for Java development, create an external build system project. For a Hello World program, you could get away with using the Java compiler as the build tool. For larger programs use something like ant as the build tool.
 
Give both Eclipse and Netbeans a try first before you make up your mind.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.