开发者

Does Xcode Support Java program Compilation and Running?

In XCode, I saw the template for Java but I could not get the output of my program written in one of the Java templates (Java Application). Does Xcode supports Java compi开发者_StackOverflow社区lation? If it supports it, should I add any thing to my program to run? It is just a "Hello World" program.


XCode does support Java development.

I'm not sure if you're asking for this specific to the iPhone - it's listed in the tags but not mentioned anywhere in your question. The iPhone only supports program development in Objective-C - to get a Java program to run on the iPhone you'd have to run it through a cross-compiler to turn your Java program into an Objective-C program. XMLVM is usually the cross-compiler mentioned in regards to this.

So, if you're developing a regular Java app that's going to run as a desktop or web app hosted on a Linux/Windows/Mac computer - XCode will do that. If you're trying to develop a Java app for the iPhone, you'll have to develop the app in Java (using XCode of otherwise), run it through a cross-compiler to produce an Objective-C program (not something that XCode does), and then deploy that to the iPhone.


Xcode goes not include gcj, but some people have managed to add it. No guarantees that this can be used to create iPhone apps though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜