Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

org.jdesktop.application package doesn't exist

Tags:

java

netbeans

I was building a java desktop application from few days and all was going well.

But today, when I opened the Netbeans and compiled a file, the following compilation error occrured:

Compiling 9 source files to C:\Documents and Settings\Administrator\Desktop\EMS\build\classes
C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSAboutBox.java:7:             package org.jdesktop.application does not exist
import org.jdesktop.application.Action;
C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSApp.java:7: package org.jdesktop.application does not exist
import org.jdesktop.application.Application;
C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSApp.java:8: package org.jdesktop.application does not exist
import org.jdesktop.application.SingleFrameApplication;
C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSApp.java:13: cannotfind symbol
symbol: class SingleFrameApplication
public class EMSApp extends SingleFrameApplication {

C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSView.java:7: package org.jdesktop.application does not exist
import org.jdesktop.application.Action;
C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSView.java:8: package org.jdesktop.application does not exist
import org.jdesktop.application.ResourceMap;
C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSView.java:9: package org.jdesktop.application does not exist

I was using the same code before but no error occured like this. When I checked the libraries, then the org.jdesktop.application package is there and when we import that package, the netbeans show the "application" package in suggestion.

Then why the error is there when the package is already there. If the package was not in the library, then Netbeans would have shown a red line under the import statement, but it is not showing that red line too.

Where is the problem?

like image 320
Yatendra Avatar asked Feb 12 '26 12:02

Yatendra


2 Answers

NetBeans has these habit of spontaneously screwing things. Clean your project and rebuild it afresh.

If it doesn't help, clean your workspace.

like image 173
Bozho Avatar answered Feb 15 '26 02:02

Bozho


I had the same problem. It wasn't problem with netbeans cache or something similar.

My project depended on some Swing package which was needed to install.

Right click on project > Click on Resolve project problems, now just install missing package and problem is solved.

like image 44
vanrado Avatar answered Feb 15 '26 01:02

vanrado



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!