I just installed Netbeans IDE. I am now unable to import any org.* libs and it just says package org does not exist
.
Also, I imported jdic.jar into the project and even though the code completion suggestions show up as org.jdesktop.*, it shows the same error.
How do I fix this?
Clearing the cache fixed it.
In windows 7 the cache is located in
C:\Users\username\AppData\Local\NetBeans\...
On Linux, the cache is at:
/home/username/.cache/netbeans/...
On clearing the cache, and restarting netbeans, it started to recognize org.*
imports again.
org.netbeans.lib.awtextra is part of the AbsoluteLayout library. It should be added automatically by the ide whenever absolutelayout is used in the form. But if you switch to some other layout after using absolute layout, then the jar/library will be removed from the classpath and existing code making calls to the library will not compile.
If you would like to use absolute layout, then please include the library in the project. Select 'Libraries' node in the project, right-click and select 'Add Library' and select 'Absolute Layout' library from the list of available libraries.
If you do not wish to use absolute layout, then it is best to uncomment/remove code relying on the library and re-do the form design using the new layout.
Can you try importing
import org.xml.sax.Attributes;
This is part of the JDK. If you can't find that, something is really wrong.
I suspect you need to add the libraries to your maven pom.xml
file.
You should redirect all the lost .jar files by exiting netbeans, then reopening it. There should be a prompt asking you to help the IDE find the .jar files. So please do so. If you aren't able to find the jar file. Clean and build the individual packages. There a new directory called a dist directory will be created in the package directory. Now you can redirect them.