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

Can you code in Java in Xcode

Im taking a java class in school and we are using Jcreator. I know that there is no Mac download for Jcreator. I was wondering if it is possible to code in java in Xcode?

MacBook Pro, Mac OS X (10.7.2)

Posted on Sep 18, 2012 8:30 AM

Reply
4 replies

Sep 19, 2012 1:50 AM in response to prmccar

No probably not, Xcode is an IDE specifically for Cocoa (Objective C), the programming language of Apple. Scripting languages like Python, Ruby and Java are text files and don't need to be compiled, so Xcode does not treat them like they are inside an IDE. Since I write mostly Python, I have to run my webapp from Apache in a browser, or as a text file from Terminal because there is no "Run" button in Python. But you also do not "build" Python like you do in Cocoa, you just run it as a script, the same with Java. So I think you will find that Xcode is lacking the extreme convenience of a dedicated Java IDE.


On the upside, Xcode is free, renders very readably in OSX and runs very smoothly. In the case of Python, I have tried a few IDEs however because they run inside the JVM emulator they rendered poorly and conrols were all jerky. So I stuck with Xcode and am satisfied. There are probably more options for Java but I don't know. There are no Cocoa IDEs for Python, if there was I would probably use it.


If I had to advise a new user I would recommend you find an IDE written in Cocoa, if such a thing even exists for Mac. Or you may not even need one. Running your application from the command line is easy, flexible and professional. You write your code as a text file and run it in Terminal (or Apache) and you get the output as text (or a webpage). If you are taking a class this may be the best approach, since you may want to abandon Java afterwards for a cleaner programming language.

Can you code in Java in Xcode

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