简体   繁体   English

Java ME 3.0中示例Midlet中的编译错误

[英]compilation error in example midlet from Java ME 3.0

There are many example in j2me sdk 3.0 (http://www.oracle.com/technetwork/java/javame/javamobile/download/overview/index.html) j2me sdk 3.0中有很多示例(http://www.oracle.com/technetwork/java/javame/javamobile/download/overview/index.html)

I'm trying to build example to learn more about MIDlet 2d graphics. 我正在尝试构建示例,以了解有关MIDlet 2d图形的更多信息。

  AGUISwingSet2 error: package javax.swing does not exist

  BdjGunBunny error: package java.awt does not exist

How to build it or include those package? 如何构建或包含那些软件包?

I'm trying to build example to learn more about MIDlet 2d graphics. 我正在尝试构建示例,以了解有关MIDlet 2d图形的更多信息。

  AGUISwingSet2 error: package javax.swing does not exist BdjGunBunny error: package java.awt does not exist 

Your mistake is expecting the AGUI examples to work with MIDlets based on MIDP (JSR 118) API . 您的错误是期望AGUI示例可与基于MIDP(JSR 118)API的 MIDlet一起使用。 This ain't possible. 这是不可能的。

  • If you want to learn more about MIDlet 2d graphics then find other examples. 如果您想了解有关MIDlet 2d图形的更多信息,请查找其他示例。
  • If you want to study examples AGUISwingSet2 and BdjGunBunny then recondigure SDK platform for CDC stack - as described in their documentation here 如果要研究示例AGUISwingSet2BdjGunBunny,则重新构建CDC堆栈的SDK平台-如此处的文档所述

Try to add those package (if you are using netbeans IDE). 尝试添加那些软件包(如果您使用的是netbeans IDE)。 right click on project name>properties>build>libraries&Resource> Add Library. 右键单击项目名称>属性>构建>库和资源>添加库。 Hope it will solve your problem. 希望它能解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM