Can't edit java code-file is somehow empty

Hopefully this has a trivial answer: I have a java file which I wrote and edited a while back, but at some point I tried to open it recently and it says it is 0kb and no code is displayed in the IDE(i tried more than one). What is really confusing is that it runs perfectly from command line. It was just quite a small GuiApp, and all the class files are still there. Any help would be appreciated

1 answer

  • answered 2018-01-17 12:04 apexlol

    You can decompile the .class file and you will see your code.

    Fair warning, this will be 'compiled code' so expect to see many changes in your code as the compiler has the liberty to optimise code where it sees fit. You may see it use the StringBuilder class for example where you simply concated a couple of strings, etc.