`
deaboway
  • 浏览: 54173 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

在eclipse上用lwuit的过程

 
阅读更多

下面是国外一个人发的在eclipse上用lwuit的过程。(是有很多注意的地方,感觉这个东西还是用sun的netbean方便)
Hello all

if you are an Eclipse developer like me, than you are probably missing the possibility to build LWUIT with Eclipse. This small How-To describes what I did to get this done:

What you need
a. Love to work with Eclipse :-)
b. A subversion client (I use TortoiseSVN) and some subversion know-how
c. A good internet connection

Setup Eclipse and create a new Midlet project
1. Install the Eclipse MJT plugin (http://www.eclipse.org/dsdp/mtj/ ) and set it up correctly (http://www.eclipse.org/dsdp/mtj/ ... /gettingstarted.php )
2. Create a new "Midlet Project"
3. Open the "Application Descriptor" file and change the "Microedition Profile" from version 2.1 to 2.0

Checkout LWUIT
4. Open a file explorer and navigate to the new project in your Eclipse workspace (You can see where this is in the project properties (Alt-Enter) on the "Resource"-tab)
5. Checkout the LWUIT directory with the URL "https://lwuit.dev.java.net/svn/lwuit/trunk/MIDP/LWUIT" (guest/guest) directly into your project directory with your svn client

Fix compilation errors
6. Go back to Eclipse and refresh (F5) your project: now there "src" folder should show some "com.sun.lwuit" folders and also (unfortunately) some compiling errors
7. To fix the compiling errors (maybe if someone of the developer team reads this, he can fix this directly in the repository), open the erroneous classes and put a "this." in front of every expression marked as error ("setLayout..." -> "this.setLayout...")

Download necessary build files
8. Now comes the circumstantially part. You have to download Netbeans! Yes, I'm afraid so. All you need is a JAR file with about 200K, that's inside the Netbeans distribution. But I don't want to post it here, because I am not sure if this offend against any SUN licenses.
9. After you downloaded and installed Netbeans, create a "lib" directory inside your project. Then copy the "org-netbeans-modules-mobility-antext.jar" from the "NETBEANS_INSTALLATION/mobility8/modules" directory into your new "lib" directory.

Fix the build for Eclipse
10. Open "nbproject/build-impl.xml" and delete "${netbeans.user}/" in line 7. The line should now appear as:
<property name="user.properties.file" location="build.properties"/>
(I know, that this file should not be edited (see line 2), maybe someone has a better idea here)
10. Create a new "build.properties" file right under the project (next to "build.xml") with your settings for the build. You need at least this three entries here:
* "project.LWUIT" = the path to the LWUIT project (in our case this is ".")
* "libs.j2me_ant_ext.classpath" = the path to the netbeans lib (in our case this is now "lib/org-netbeans-modules-mobility-antext.jar")
* "platform.home" = the path to your WTK (this depends on your WTK installation)

My "build.properties" looks like this:

project.LWUIT=.
libs.j2me_ant_ext.classpath=lib/org-netbeans-modules-mobility-antext.jar
platform.home=C://WTK2.5.2

These are the minimum entries for the "build.properties" file. If someone finds more useful settings, please post it here.

Run the build
Now everything should be ready to run the build. Right-Click on "build.xml" and say "Run as/Ant Build". The build should finish successfully and you should find the resulting "LWUIT.jar" in the "dist" directory of the project.

I hope I can make some Eclipse developers happy with this How-To. Any comments are welcome.

分享到:
评论

相关推荐

    lwuit界面在eclipse下的例子

    lwuit界面在eclipse下的例子,原为netbean下的例子,现在改为eclipse下,以供eclipse下的大家共同交流。本程序仅为编程参考,希望lwuit能发展得更快些,那我们就有福了

    Eclipse下真正可用的LWUIT源码及实例

    Eclipse下真正可用的LWUIT源码及实例

    lwuit-blackberry上移植的版本

    Lwuit在blackberry上的移植版本,使用subversion签下来的,我把这个从lwuit-incubator中提取出来的,里面有DOC和源码,不过它把4.2-4.7版本放在一起了,应用的时候需要根据自己项目实际进行裁剪和修改。

    LWUIT.jar LWUIT.jar

    LWUIT.jarLWUIT.jarLWUIT.jarLWUIT.jarLWUIT.jarLWUIT.jar

    最新LWUIT_1_5

    LWUIT哦,最新的包,学习学习。非常好用哦

    LWUIT_3_1英文原版.part1

     Sun在2008年的JavaOne会议上向开发者社区推荐了LWUIT,展示了预先发布的二进制文件库,附加工具和扩展文档,让开发者可以快速上手,现在Sun把整个源代码都开放出来,更方便开发者利用LUWIT开发JavaME应用。

    Lwuit入门程序测试一下Demo

    Lwuit入门程序测试一下Demo 里面需要用到LWUIT的jar包

    使用Lwuit中遇到的问题解决

    LWuit 在Eclipse环境下常遇到的问题。里面有解决方案。大家可以拿来参考。

    LWUIT的最新源代码(官方的LWUIT.jar反编译)

    在网上找了很久源代码,基本上都是缺胳膊少腿的,svn上1.3版的代码还处于测试阶段,还不能用。 官方的只通了LWUIT.jar和Demo的下载,没有源代码,我把这个LWUIT.jar反编译了一下,把反编译过后产生的错误修改好了,...

    lwuit 1.2.1lwuit 最新

    The Lightweight UI Toolkit (LWUIT) 是一个轻量级JavaME UI工具包。LWUIT类似Swing 的MVC架构, 支持多种布局(Layouts), 皮肤更换, 字体, 触摸屏, 动画效果, Rich控件, 3D集成, Painter, 模式对画框, I18N/L10N等...

    LWUIT最新源代码

    Sun在今年的JavaOne会议上向开发者社区推荐了LWUIT,展示了预先发布的二进制文件库,附加工具和扩展文档,让开发者可以快速上手,现在Sun把整个源代码都开放出来,更方便开发者利用LUWIT开发JavaME应用。 LWUIT源...

    Lwuit-九宫格源码

    J2me使用Lwuit实现的九宫格图像用户界面。

    lwuit_demo_src.rar_DEMO_J2ME lwuit de_LWUIT_lwuit demo

    lwuit demo 的源代码,基本重要的函数都在这里进行了展示

    lwuit1.4介绍

    根据搜索翻译出来的lwuit1.4的介绍,有兴趣的朋友可以看看

    lwuit实例 lwuit j2me 界面

    最新开源 j2me 资源代码,如果有人可以改成在eclipse 的项目,就感激不尽

    lwuit Developer_Guide

    lwuit的开发文档 Hello World for MIDP import com.sun.lwuit.Display; import com.sun.lwuit.Form; import com.sun.lwuit.Label; import com.sun.lwuit.layouts.BorderLayout; import ...

    lwuit1.4 jar包

    lwuit1.4 jar包 lwuit1.4 jar包 lwuit1.4 jar包 lwuit1.4 jar包

    真正用lwuit实现调用调用谷歌天气预报

    网上还真的没有用lwuit这个包调用谷歌天气预报的程序,但我的事真正用到lwuit这个包!!

    LWUIT_J4LChart

    在J2ME开发环境(NETBEANS)上使用LWUIT + J4LChart 实现精美的图表,有多种图像表示。。。。。

    lwuit.rar_J2ME lwuit_LWUIT_j2me_j2me LWU_九宫

    J2ME lwuit实现屏幕九宫图,功能十分强大

Global site tag (gtag.js) - Google Analytics