Error:(9,33) java: package org.jetbrains.annotations does not exist

已回答

Hi. I have this error when trying to build Spigot plugin with Maven (created using project wizard):

Error:(9,33) java: package org.jetbrains.annotations does not exist

 

The thing is - IDEA complains about Windows Defender possibly intruding build process, so I keep automatically configuring it (I installed new updates recently, for Windows Insider I am using). However, IDEA doesn't seem to require restart. It didn't do that before, and I definitely was auto-configuring Defender before. No restart, definitely didn't change anything related to annotations, and it only started to do this just few minutes ago. I can't understand why. Restarting the IDE didn't help at all and I don't know where I could find settings related to that issue...

0

Reinstall from http://www.jetbrains.com/idea/download/index.html. Disable the antivirus before installing.

Annotations are normally linked in the JDK configuration. Make sure the specified file exists.

0

my AppData\JetBrains directory does not contain a Toolbox folder.

Ralph

0

Ralph Bloch If not using Toolbox, look in IDE_HOME directory.

0

I can't find an 'IDE_HOME' directory. JetBrains only contains 'IdealC2022.3', and there is no 'ch-2' subdirectory

0

Ralph Bloch

IDE_HOME\plugins\java\lib\resources\jdkAnnotations.jar

IDE_HOME = the directory where you installed IntelliJ IDEA.

0

I have only he following plugins: <dir>ImageCache; <dir>meta; 1347-meta; 1347-meta.json.etag; brokenPlugins; brokenPlugins.etag;  plugins.XML.lds; plugins.XML.lds.etag

0

You are looking in the wrong directory. Please find the directory where your IDE is installed. It's NOT any of these directories: https://intellij-support.jetbrains.com/hc/en-us/articles/206544519.

IDEA_HOME location for IntelliJ IDEA Community Edition without Toolbox would be:

C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.2

0

OK, thanks, and I found it. (jdkAnnotations.jar), and it is now in the JDK home path: C:\Program Files\Java\jdk-17.0.4

But even though it supposedly weighs 644 KB, module-info.java (3) requires javafx.fxml and can't find the annotations. Also line 2 javafx.controls can't find org.intellij.lang.annotations. 

0

Ralph Bloch Please contact support at https://intellij-support.jetbrains.com/hc/requests/new with the sample project to reproduce the issue attached. Also attach the screenshots of the issue.

0

OK, will do, thank you

0

请先登录再写评论。