Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Netbeans: 'Package does not exist'

Tags:

java

netbeans

I have a problem with my code, even though it hasn't been modified in any way. It just suddenly threw this message. As you can see on the left, that they are all in the correct package, and have correct names.
What can I do to fix this problem?

enter image description here

like image 911
user5903893 Avatar asked Feb 12 '16 11:02

user5903893


People also ask

Why Java is not showing in NetBeans?

Click “Tools” in the menu bar and select “Plugins“. Then go to “Available Plugins” tab and sort on Name column and search for “Java EE Base“. Select the checkbox. Click “Install” button and finish the installation.

How do I run a package program in NetBeans?

Running the Application Make sure to save the Java source file, right-click the project and choose Run or choose Run Project under the Run menu. Click Select Main Class. In the Output window (which can be opened from the Window menu), you should see the below.

Does NetBeans work with JDK 15?

Apache Netbeans 12.2 Supports Java 14 and 15.


1 Answers

Clear the cache to fix it. In Windows, cache is located at:

C:\Users\username\AppData\Local\NetBeans\...

On Linux, cache is at:

/home/username/.cache/netbeans/...

After clearing the cache restart netbeans.

like image 145
itzmebibin Avatar answered Nov 02 '22 05:11

itzmebibin