3

So I have a java project that I opened using IntelliJ. However I am getting the following error

cannot resolve symbol string

I checked file->project_structure and found that the project SDK is invalid

enter image description here

So I tried to add java sdk to the project. I followed the instruction mentioned here and found that my SDK path is

/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

However when I try to add and SDK using that link I get the following error message

enter image description here

I am not sure I understand where is the problem .. any suggestions ?

Community
  • 1
  • 1
Abdelrahman Shoman
  • 2,882
  • 7
  • 36
  • 61

1 Answers1

2

You're pointing IntelliJ IDEA to the "bin" directory of the JDK's JRE, while IntelliJ IDEA wants you to specify the "home" directory of the JDK. The valid path would be /usr/lib/jvm/java-8-openjdk-amd64

ldz
  • 2,217
  • 16
  • 21