Java source file displaying in IntelliJ as an empty decompiled class file
up vote
2
down vote
favorite
I have a project with several .java
files that I can view the source of perfectly in IntelliJ, except for one.
That file is a .java
file like the others, but IntelliJ labels it a "Decompiled .class file" and the source is completely empty. If I open the file in a text editor, I can see the source just fine. Ant builds also work fine with this file.
These are not JDK sources that are missing, where you might expect to see decompiled code. And this is not a compiled .class
file I'm opening, either.
Deleting the file from the project and updating from source control to restore it doesn't seem to help.
Here is what it looks like when I try to open the file in IntelliJ:
What might cause this behavior in IntelliJ and what can I do to fix it?
java intellij-idea
add a comment |
up vote
2
down vote
favorite
I have a project with several .java
files that I can view the source of perfectly in IntelliJ, except for one.
That file is a .java
file like the others, but IntelliJ labels it a "Decompiled .class file" and the source is completely empty. If I open the file in a text editor, I can see the source just fine. Ant builds also work fine with this file.
These are not JDK sources that are missing, where you might expect to see decompiled code. And this is not a compiled .class
file I'm opening, either.
Deleting the file from the project and updating from source control to restore it doesn't seem to help.
Here is what it looks like when I try to open the file in IntelliJ:
What might cause this behavior in IntelliJ and what can I do to fix it?
java intellij-idea
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I have a project with several .java
files that I can view the source of perfectly in IntelliJ, except for one.
That file is a .java
file like the others, but IntelliJ labels it a "Decompiled .class file" and the source is completely empty. If I open the file in a text editor, I can see the source just fine. Ant builds also work fine with this file.
These are not JDK sources that are missing, where you might expect to see decompiled code. And this is not a compiled .class
file I'm opening, either.
Deleting the file from the project and updating from source control to restore it doesn't seem to help.
Here is what it looks like when I try to open the file in IntelliJ:
What might cause this behavior in IntelliJ and what can I do to fix it?
java intellij-idea
I have a project with several .java
files that I can view the source of perfectly in IntelliJ, except for one.
That file is a .java
file like the others, but IntelliJ labels it a "Decompiled .class file" and the source is completely empty. If I open the file in a text editor, I can see the source just fine. Ant builds also work fine with this file.
These are not JDK sources that are missing, where you might expect to see decompiled code. And this is not a compiled .class
file I'm opening, either.
Deleting the file from the project and updating from source control to restore it doesn't seem to help.
Here is what it looks like when I try to open the file in IntelliJ:
What might cause this behavior in IntelliJ and what can I do to fix it?
java intellij-idea
java intellij-idea
edited Nov 19 at 23:39
Karol Dowbecki
14k72745
14k72745
asked Nov 19 at 21:11
bmessler
9111
9111
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
If the same class (comparing fully qualified name) is both existing in your project and simultaneously coming from a 3rd party dependency at times IntelliJ will get confused.
This happens also for dependencies if you have the decompiled class open in a editor window and press "Download Sources" action. This results in another editor window opening the just downloaded source code for the same class and IntelliJ navigation going bonkers (Ctrl + Left click
jump and other actions).
The only solution I know of is to restart IntelliJ and hope that it works. You can also try File > Invalidate Caches and Restart
which will force IntelliJ to re-index the world.
It's a pretty unique class name, so there shouldn't be any collision issues there. And no other decompiled classes opened in other windows. Neither restarting norFile > Invalidate Caches and Restart
seemed to help.
– bmessler
Nov 19 at 21:38
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
If the same class (comparing fully qualified name) is both existing in your project and simultaneously coming from a 3rd party dependency at times IntelliJ will get confused.
This happens also for dependencies if you have the decompiled class open in a editor window and press "Download Sources" action. This results in another editor window opening the just downloaded source code for the same class and IntelliJ navigation going bonkers (Ctrl + Left click
jump and other actions).
The only solution I know of is to restart IntelliJ and hope that it works. You can also try File > Invalidate Caches and Restart
which will force IntelliJ to re-index the world.
It's a pretty unique class name, so there shouldn't be any collision issues there. And no other decompiled classes opened in other windows. Neither restarting norFile > Invalidate Caches and Restart
seemed to help.
– bmessler
Nov 19 at 21:38
add a comment |
up vote
2
down vote
If the same class (comparing fully qualified name) is both existing in your project and simultaneously coming from a 3rd party dependency at times IntelliJ will get confused.
This happens also for dependencies if you have the decompiled class open in a editor window and press "Download Sources" action. This results in another editor window opening the just downloaded source code for the same class and IntelliJ navigation going bonkers (Ctrl + Left click
jump and other actions).
The only solution I know of is to restart IntelliJ and hope that it works. You can also try File > Invalidate Caches and Restart
which will force IntelliJ to re-index the world.
It's a pretty unique class name, so there shouldn't be any collision issues there. And no other decompiled classes opened in other windows. Neither restarting norFile > Invalidate Caches and Restart
seemed to help.
– bmessler
Nov 19 at 21:38
add a comment |
up vote
2
down vote
up vote
2
down vote
If the same class (comparing fully qualified name) is both existing in your project and simultaneously coming from a 3rd party dependency at times IntelliJ will get confused.
This happens also for dependencies if you have the decompiled class open in a editor window and press "Download Sources" action. This results in another editor window opening the just downloaded source code for the same class and IntelliJ navigation going bonkers (Ctrl + Left click
jump and other actions).
The only solution I know of is to restart IntelliJ and hope that it works. You can also try File > Invalidate Caches and Restart
which will force IntelliJ to re-index the world.
If the same class (comparing fully qualified name) is both existing in your project and simultaneously coming from a 3rd party dependency at times IntelliJ will get confused.
This happens also for dependencies if you have the decompiled class open in a editor window and press "Download Sources" action. This results in another editor window opening the just downloaded source code for the same class and IntelliJ navigation going bonkers (Ctrl + Left click
jump and other actions).
The only solution I know of is to restart IntelliJ and hope that it works. You can also try File > Invalidate Caches and Restart
which will force IntelliJ to re-index the world.
answered Nov 19 at 21:17
Karol Dowbecki
14k72745
14k72745
It's a pretty unique class name, so there shouldn't be any collision issues there. And no other decompiled classes opened in other windows. Neither restarting norFile > Invalidate Caches and Restart
seemed to help.
– bmessler
Nov 19 at 21:38
add a comment |
It's a pretty unique class name, so there shouldn't be any collision issues there. And no other decompiled classes opened in other windows. Neither restarting norFile > Invalidate Caches and Restart
seemed to help.
– bmessler
Nov 19 at 21:38
It's a pretty unique class name, so there shouldn't be any collision issues there. And no other decompiled classes opened in other windows. Neither restarting nor
File > Invalidate Caches and Restart
seemed to help.– bmessler
Nov 19 at 21:38
It's a pretty unique class name, so there shouldn't be any collision issues there. And no other decompiled classes opened in other windows. Neither restarting nor
File > Invalidate Caches and Restart
seemed to help.– bmessler
Nov 19 at 21:38
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53382692%2fjava-source-file-displaying-in-intellij-as-an-empty-decompiled-class-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown