IDEA not finding rt.jar with 2018.2.3 snap install

Answered

I installed IDEA Ultimate Edition via a snap.  My gradle project imports without errors but once I try to open source files, all core java types (e.g. String, List, Map, etc...) are "Unrecognized Symbol" or similar error (i.e. Red). 

I assumed I was accidentally using the wrong JDK but confirmed that I'm using Oracle JDK 1.8.  When I looked into Project Structure -> Platform Settings -> SDKs -> 1.8 -> Classpath... I noticed rt.jar wasn't in there.  I manually added it and I seem to be back in business but this doesn't seem like something I should have to do.

Any suggestions?

 

0
2 comments

Make sure that your JDK installation that you use in IDE project is valid. This JDK has no relation to IntelliJ IDEA installation itself. And snap install bundles the same IDE distribution package as usual installation.

0
Avatar
Permanently deleted user

The only thing I can think of was that something got imported incorrectly when it imported my previous Intellij settings.  The JDK is complete and works fine, the only issue was that rt.jar wasn't included with the SDK in IDEA.  Adding it back seems to have solved my problems.  I'll chalk this up to not having an absolute clean install. 

I agree this wouldn't seem to have anything to do with the snap install (which I'm loving), I just wanted to provide context in case it was relevant.

Thanks, back to coding!

0

Please sign in to leave a comment.