简体   繁体   中英

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)

I'm trying to build example to learn more about MIDlet 2d graphics.

  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.

  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 . This ain't possible.

  • If you want to learn more about MIDlet 2d graphics then find other examples.
  • If you want to study examples AGUISwingSet2 and BdjGunBunny then recondigure SDK platform for CDC stack - as described in their documentation here

Try to add those package (if you are using netbeans IDE). right click on project name>properties>build>libraries&Resource> Add Library. Hope it will solve your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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