NetBeans error: package org does not exist

女生的网名这么多〃 提交于 2019-11-30 13:05:50
Anirudh Ramanathan

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!