Intellij shows decompiled .class file instead of source code
Hi there.
I am having issues with Intellij IDEA - it shows me a "decompiled" version of the class instead of its source code if I ctrl+click the class.
I am trying to open regular JDK source files.
What I have:
-
Bytecode Viewer plugin is off.
-
Java Bytecode Decompiler plugin is off.
-
Platform, Project and Module all have same JDK version setup.
-
I have 2 JDK's available in Intellij: jdk1.8.0_161 and jbsdk8u112b287.2_windows_x86 (bundled with Intellij, but comes without src.zip). Tried with both (had to specify src.zip of jdk1.8.0_161 for jbsdk8u112b287.2_windows_x86) - no luck
-
src.zip is not corrupt - I can open it via WinRAR
-
When added jdk1.8.0_161 to Intellij, it automatically found src.zip. When manually added src.zip to jbsdk8u112b287.2_windows_x86 Sourcepath tab - it started "Scanning for roots", but warned me that it "cannot determine what kind of files the chosen items contain" and offered me to "attach them as 'Sources'" so I agreed.
-
Tried File > Invalidate Caches / Restart... - same result.
-
Same issue in 2017.3 and fresh 2018.1 versions of Intellij.
-
Providing path for Documentation makes Intellij look for the documentation in the path specified. So it works as it should for both of JDKs. But not for sources.
-
Everything else works/compiles properly
Any help would be appreciated!
Post is closed for comments.
Asked for details at https://stackoverflow.com/questions/49558009/intellij-shows-decompiled-class-file-instead-of-source-code#comment86135147_49558009.
Известно что-нибудь по этому багу? Та же самая фигня в IU-182.3684.40
Please see https://intellij-support.jetbrains.com/hc/en-us/community/posts/206224519-CTRL-clicking-goes-to-decompiled-class-instead-of-java-class .
Note that this forum is English only. If you prefer communicating in Russian, please submit a ticket via https://intellij-support.jetbrains.com/hc/requests/new.
I used to have the same problem. The solution for me was to go into File > Project Structures > Modules and mark src as Sources