Java error: package com.intellij.openapi.actionSystem does not exist

Answered

Looking at

https://github.com/JetBrains/intellij-sdk-code-samples/tree/main/action_basics

Cannot resolve symbol 'intellij'

import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.editor.Editor;
5 comments
Comment actions Permalink

Downloading these and adding to the classpath helped for me.

extensions-7.0.3.jar
openapi-7.0.3.jar

See https://jar-download.com/?search_box=com.intellij

 

0
Comment actions Permalink

This additional step is wrong. Please follow the exact instructions given on above page.

0
Comment actions Permalink

Removed them and using the first answer in
https://stackoverflow.com/questions/64205627/package-org-jetbrains-annotations-does-not-exist

changed the product structure to the attached screenshots - rebuild project works without any errors.

Project - select SDK
SDKs - add app.jar from PhpStorm
Libraries - add intellij.openapi and jetbrains.annotations

 

 

 

0
Comment actions Permalink

Please do not trust answers from SO that do not come from JetBrains. It is plain wrong.

0

Please sign in to leave a comment.