Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse does not recognize org.jdesktop.*

I use JRE system Library [jre7] and when I import org.jdesktop.application.Action I get

The import org.jdesktop cannot be resolved

I removed the build path by Build Path > remove from build path and then I did
project > properties > java build path > add Library > JRE system Library and still same error .

like image 342
URL87 Avatar asked Jun 04 '12 13:06

URL87


2 Answers

If anyone is interested, I had to download 3 JARs:

  • appframework-1.0.3.jar (link in previous post) wich contains org.jdesktop.application classes,
  • swing-layout-1.0.3.jar link wich contains org.jdesktop.layout classes,
  • swing-worker-1.1.jar link wich contains org.jdesktop.swingworker classes, required by the others jar
like image 157
Julien Avatar answered Sep 21 '22 15:09

Julien


The org.jdesktop code is not part of Java SE, so the classes won't be in the JRE. You need to locate and download a JAR file containing the classes, and then add it to your Eclipse buildpath.

(One place to download the JAR is here ... but it is easy to do your own searching if this link breaks. Go to Maven Central or findjar.)

like image 30
Stephen C Avatar answered Sep 20 '22 15:09

Stephen C