在eclipse上用lwuit的过程

本文档详细介绍了如何在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.

【电动车优化调度】基于模型预测控制(MPC)的凸优化算法的电动车优化调度(Matlab代码实现)内容概要:本文介绍了基于模型预测控制(MPC)的凸优化算法在电动车优化调度中的应用,并提供了Matlab代码实现。该方法结合了MPC的滚动优化特性与凸优化的高效求解能力,用于解决电动车充电调度问题,提升电网运行效率与可再生能源消纳能力。文中还提及多个相关研究方向和技术支撑,包括智能优化算法、机器学习、电力系统管理等,展示了其在多领域交叉应用的潜力。配套资源可通过提供的网盘链接获取,涵盖YALMIP工具包及其他完整仿真资源。; 适合人群:具备一定电力系统、优化理论及Matlab编程基础的科研人员和研究生,尤其适合从事电动汽车调度、智能电网优化等相关课题的研究者。; 使用场景及目标:①实现电动车集群在分时电价或电网需求响应机制下的有序充电调度;②结合可再生能源出力与负荷预测,利用MPC进行多时段滚动优化,降低电网峰谷差,提高能源利用效率;③为学术论文复现、课题研究及工程仿真提供可靠的技术路线与代码支持。; 阅读建议:建议读者结合文档中提到的智能优化算法与电力系统背景知识进行系统学习,优先掌握MPC基本原理与凸优化建模方法,并下载配套资源调试代码,以加深对电动车调度模型构建与求解过程的理解。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值