compilation error in example midlet from Java ME 3.0

595 views Asked by At

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?

2

There are 2 answers

1
ruben On

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.

0
gnat On

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