Open a java .class file in Eclipse IDE

3

In Eclipse, when loading the .CLASS file, I get the following error class

  

the Class File viewer can not handle the input given ('org.eclipse.ui.ide.FileStoreEditorInput').

What is the reason for that? What steps should be followed to correct that error and can run programs?

    
asked by cristobal 04.10.2016 в 01:15
source

2 answers

3

The file with class extension. is the file already compiled and can not be viewed by eclipse unless you install this plugin Java Decompiler for eclipse, instructions are on the page

or you can do it from your consola de comandos de windows (Download the .exe Download )

  • Copy the exe to the folder where the class files are

  • Go to your Cmd, go to your folder where your files are .class cd pathfiles

  • Type jad nombrearchivo.class and enter

  • After executing you will already have a file with extension jad that will have the java code of your file class

answered by 04.10.2016 в 01:45
0

The .class file is the result of compiling the .java files. The content of the .class files is clearly binary and can not be interpreted by a text editor (which seems to be the program you use to open the file).

To see the content of the .class you need a decompiler. Or, failing that, know the sources that originated the file.

    
answered by 04.10.2016 в 01:20