且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否有Java的Cocoa或Objective C api?

更新时间:2023-11-28 23:33:40

iPhone上没有Java VM-xmlvm必须将Java代码交叉编译为电话的可执行文件.

There is no java VM on the iphone - xmlvm must cross-compile the java code into an executable for the phone.

edit 1:据说来自Java,您可能不会发现目标C迁移到它会带来很大的震撼.我花了几个月的时间从Java和C/C ++中学习它-大多数关于iphone编程的书(例如,实用的程序员的书)也提供了一些语言背景,以帮助您入门.这是一个学习曲线,但最终我怀疑它会成为电话上的一流语言,并且得到工具和文档等的良好支持,因此令人沮丧.

edit 1: that said coming from Java, you may not find objective-C that much of a shock to migrate to. It took me a few months to learn it coming from Java and C/C++ - most of the books about iphone programming (e.g. the pragmatic programmer's one) also give a little background on the language to get you started. It is a learning curve but ultimately I suspect a lot less frustrating as it the first-class language on the phone and well supported by tools and documentation etc.

edit 2:乍一看该网页,看起来xmlvm产生的实际上是Objective-C,与本机xvmlm支持框架链接在一起.我假设下一步是使用您拥有的任何工具链来编译Objective-C输出-可能是xcode,但如果没有的话,则是一些gcc工具链.无论如何,最终结果将是本机可执行文件,而不是Java字节码.您将像从Objective-C生成的任何可执行文件一样进行安装.

edit 2: From a glance at the webpage, it looks like what xmlvm produces is actually objective-C, linked against a native xvmlm support framework. I assume the next step is to compile the objective-C output using whatever toolchain you have - probably xcode but if not then some gcc toolchain. Anyway the end result is going to be a native executable not java bytecode. You'll install that just like any executable you build from objective-C.