Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how to execute java programs in xcode

I cannot execute Java program in XCode for Mountain Lion 10.8.2. Please help me how to execute a Java program.

MacBook Pro (13-inch, Mid 2012), OS X Mountain Lion (10.8.2), JAVA

Posted on Nov 30, 2012 4:49 AM

Reply
Question marked as Best reply

Posted on Dec 1, 2012 7:43 AM

Do you have a particular error or message or diagnostic or issue, or something that's particularly wrong with Xcode? If installed, Java does work, and Java applications can be invoked.


Background: Java was deprecated from OS X a while back, and Java itself was removed from the default OS X 10.8 installation.


Given that Java is now an add-on for OS X, you'll want to check with Oracle — the owner of Java — for OS X kits and tools.


I don't know off-hand if Xcode still particularly supports Java (it was pretty weak, when last I checked), but I'd expect you'll be using makefiles for the work, and I'd also suspect that whatever Java support remains in Xcode will probably be going away in some future version of Xcode. (If support hasn't already disappeared. You may be using bash build scripts and makefiles to deal with Java now, or going forward.)


If you don't have access to the Apple developer forums and the discussions of tools available there, then the archives of the Apple Java-Dev mailing list can be a good spot to look for existing discussions, and to post questions related to Java development on OS X.


As for IDEs other than Xcode, Eclipse or NetBeans or IntelliJ IDEA, and BlueJ all run on OS X, and any of these would probably be a better long-term choices for Java development on OS X.

2 replies
Question marked as Best reply

Dec 1, 2012 7:43 AM in response to Saurabh Aloni

Do you have a particular error or message or diagnostic or issue, or something that's particularly wrong with Xcode? If installed, Java does work, and Java applications can be invoked.


Background: Java was deprecated from OS X a while back, and Java itself was removed from the default OS X 10.8 installation.


Given that Java is now an add-on for OS X, you'll want to check with Oracle — the owner of Java — for OS X kits and tools.


I don't know off-hand if Xcode still particularly supports Java (it was pretty weak, when last I checked), but I'd expect you'll be using makefiles for the work, and I'd also suspect that whatever Java support remains in Xcode will probably be going away in some future version of Xcode. (If support hasn't already disappeared. You may be using bash build scripts and makefiles to deal with Java now, or going forward.)


If you don't have access to the Apple developer forums and the discussions of tools available there, then the archives of the Apple Java-Dev mailing list can be a good spot to look for existing discussions, and to post questions related to Java development on OS X.


As for IDEs other than Xcode, Eclipse or NetBeans or IntelliJ IDEA, and BlueJ all run on OS X, and any of these would probably be a better long-term choices for Java development on OS X.

how to execute java programs in xcode

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.