Java sources replaced by decompiled files in Intellij

When I open a specific class using ctrl + right click, I have to be redirected to the window using java sources that contain all the lines and the corresponding comments. But instead, I get a window with a decompiled .class file.

I tried to disable the decompiler plugin, but it does not work.

If I add http://docs.oracle.com/javase/8/docs/api to the project structure -> SDKs -> Documentation paths, I can get an overview of the class or method I'm'm, but still can't open the correct source file.

Any ideas?

+8
source share
2 answers

, IDEA . , .

:

1. , .

" " (Ctrl + Alt + Shift + S ⌘ ;) sel4ct "" " ". . , . , Maven " " /, . maven, , .

enter image description here

, "Download Sources" "Download Sources and Documentation" enter image description here Maven. , , , , maven. Maven Search, .

JDK "SDK" " ", JDK " ". , {jdk-home}/src.zip .

enter image description here

IDEA JDK, , .

2. , JAR/ZIP .

explorer/finder , .

3. IDEA

, IDEA/. , IDEA . "" > " /...". IDEA. , IDEA ( IDEA).

.

FYI. , IDEA ( ), ( ), - "Decompiler Java Bytecode" "".

+9

, , ZIP , IntelliJ , .

, File > New > Project From Existing Sources..., , .jars .

0

Source: https://habr.com/ru/post/1648097/


All Articles