如何在 Xcode 5.0.2 中用 Java 编码(在 Mac 10.9.2 上)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22131097/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to code in Java in Xcode 5.0.2 (on Mac 10.9.2)
提问by user3025403
I have the newest version of Xcode, which no longer supports Java natively. So I downloaded the Java 2013-005 Developer Tools from Apple and installed it. However, when I open Xcode, I still can't find the option to code in Java.
我有最新版本的 Xcode,它本身不再支持 Java。所以我从Apple下载了Java 2013-005 Developer Tools并安装了它。但是,当我打开 Xcode 时,我仍然找不到在 Java 中编码的选项。
Can anyone give me specific steps to create a Java project in the newest Xcode?
谁能给我在最新的 Xcode 中创建 Java 项目的具体步骤?
采纳答案by Mark Szymczyk
Xcode hasn't shipped with Java project templates since version 3.1 or 3.2. If you want to use Xcode for Java, create an external build system project and tell the project to use the Java compiler or ant as the build tool.
从 3.1 或 3.2 版开始,Xcode 就没有附带 Java 项目模板。如果要使用 Xcode for Java,请创建一个外部构建系统项目,并告诉该项目使用 Java 编译器或 ant 作为构建工具。
You would be better off using something other than Xcode for Java development. Eclipse and NetBeans have better support for Java than Xcode does. The text editor TextMate 2 comes with a bundle that lets you compile and run Java programs from inside TextMate.
您最好使用 Xcode 以外的其他东西进行 Java 开发。Eclipse 和 NetBeans 对 Java 的支持比 Xcode 更好。文本编辑器 TextMate 2 附带一个包,可让您从 TextMate 内部编译和运行 Java 程序。