iSpectrum-用Java编写iPhone程序 1

今天偶然在网上看到一个宣称可以用java编写iPhone程序的eclipse插件,号称可以用java在非mac os上开发iPhone,相当感兴趣,于是按图索骥:

1 打开http://www.flexycore.com/en/products/ispectrum.html

2 选择try it now,似乎是只提供试用版的,需要注册帐号并激活,登陆后可以获得试用的license

注意:一个license只能下载一次,所以我在mac上面就不得不再次注册一个帐号。

3 开始安装,打开eclipse的software updates,我的myceclipse6.5居然不认,提示需要eclipse3.4或以上,所以搞个eclipse吧。选择new site,填写http://eclipse.flexycore.com/update/开始安装

4 填写license,否则你下载了demo也会有错误,上一步下载的plugin似乎不包含jar包,需要填写license后才开始下载。

 

Modify your Eclipse preferences to enter FlexyCore license key:

   1. Select Window > Preferences... to open the Preferences panel (on Mac OS X only: Eclipse > Preferences).
   2. Select FlexyCore from the left panel.
   3. Cut & paste your license key in the License Key field on the main panel, and click Install.
   4. Click OK.
   5. Read and accept the license agreement, then click OK.
 

5 选择File > Import... > CVS > Project from CVS,从cvs.flexycore.com下载一个demo。获得demo后的界面如下:

6 按照reference的说法,似乎可以跑了

Select the sample code project, and then compile it for iPhone by clicking the icon in the icon bar:

上面这个按钮找了我半天,反正在Java EE面板上是没有的,必须打开Debug面板才看到,一按就会提示必须在mac os上,并且安装iPhone SDK才能运行

 

Note: If you do not run iSpectrum on a Mac OS X or you do not have the Apple iPhone SDK installed on your system, iSpectrum does not launch the iPhone simulator, but Objective-C source files are generated in a folder 'build' inside the Java project, and resources are copied in a folder 'res' beside. You could import these files inside an iPhone Xcode project to compile and run your application.

 

 

    上面是官方的提示信息,似乎是在非mac系统上面按运行虽然不能直接打开模拟器,但是可以在build子目录下生成xcode的代码,很可惜在windows版的eclipse3.4上,除了上面的提示,我确认确实没有生成xcode的代码。

    后来上了它的forum,看到如下的文字:

I just downloaded and installed the Samples and iSpectrum under Windows.
In the Documentation it is mentioned that you need iPhone SDK if you want to build binaries or launch the Simulator.
In the other case it sais that it is possible to generate Objective-C code that can later be used in XCode.

Hwever, I cannot find any option in the Project Settings->Flexycore section. Am I missing something or is this feature simply disabled on the trial version?

best regards
Martin
//*********************************************************
To compile with iSpectrum you need to use a mac with the iPhone SDK installed. You cannot compile under windows.
Unfortunately you also cannot generate Objective-C files since a binary iPhone App is directly generated.

Best regards,

Benoît Lamarche
FlexyCore Developer
//*********************************************************
We apologize but the website is not up-to-date. The objective-C source file generation is an old behavior. The current behavior is to generate a binary iPhone App. A new website is in the works.

Sorry again for the misunderstanding.

Best regards,

Benoît Lamarche
FlexyCore Developer
     显然作者“曾经”可以在windows下转换为xcode代码,现在不行了,不过这样有什么用呢,没有mac的xcode也无法调试和发布。

    从上面的介绍可以看出iSpectrum其实不是在iPhone上安装java虚拟机(这个似乎有其他项目做到了),而是可以把特丁的java项目转化为xcode项目,即使能够做到如此也是相当不错的,就是不知能做到什么程度:

1 可以支持java中的哪些包,或者完成哪些功能

2 有没有使用非公开api。

3 缺乏nib,界面能设计成什么样很值得怀疑。

    正在测试mac版eclipse是否可以运行它的demo。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值