tags:

views:

6156

answers:

6

I would like to know is there any way to program (write, compile and execute) Java in XCode as I don't see any Java templates. Does that mean that it's not possible?

+1  A: 

AFAIK no, you should really use Eclipse for Java development on the OS X Platform.

Johannes Rudolph
Or IntelliJ or NetBeans
rlovtang
+7  A: 

Click Choose Window > Organizer to open the Organizer. Then click + at the bottom of the Organizer. Choose New From Template > Java Templates.

Anyway, I personally feel better with Eclipse for Java development.

Gregory Pakosz
Though I'll definitely give a try at XCode to figure out whether it can debug from Java to C in my projects involving JNI
Gregory Pakosz
+1  A: 

Do you really want to? I recommend checking out any of the really good and free Java IDEs; IntelliJ IDEA CE, Eclipse, or NetBeans.

rlovtang
A: 

I usually use NetBeans or Eclipse, but the Xcode design tool is delightful. The "Quick Model" feature is specially handy for visualizing an existing class library. Choosing New File from the File menu should show Java templates, and you'll find example projects in /Developer/Examples/Java/.

trashgod
A: 

Thx for your help I will try Eclipse for java and XCode for C/C++

Piotr Z
A: 

So bottom line

if (you want to code in C/C++) { use Xcode } else if (you want to code in Java) { use Eclipse }

Is that the correct way to sum it up? By the way, is Xcode the best C/C++ IDE for Mac? Because I know Eclipse as a C++ IDE for Mac. Also, is Xcode better than Microsoft Visual Studio for C++?

abcd