-1

I have a project which I want to import in eclipse and it has all files in .class format, If I create any file in eclipse its in .java format.

The application is created in the spring framework.

I tried to import the project by .war file. But It dose not show the .class files in that. I can not open the .class file and cant see the code.

It looks like this :

enter image description here

If I explore these folders through file explorer I can see all the .class files.

I want to check the code and run the application. How can it be done?

I am new into eclipse and web development. Can anyone help me out with this please? Thank you..

Sid
  • 2,792
  • 9
  • 55
  • 111
  • 1
    I think you should learn basic JAVA first before you start with spring & web development. If you ask about `.class` & `.java` files, then you don't know how JAVA works. Please understand basic java first. – gohil90 Feb 08 '18 at 11:39

1 Answers1

0

.class is a binary file. You cannot view the source code in a .class file. You need the .java file to view and edit code.

  • how can I convert these .class files to java files? And any idea how this default java files in eclipse are converted to .class files? Any software is there for web application which uses .class format? Or how dose it work? – Sid Feb 08 '18 at 11:22
  • You can use services [like http://www.javadecompilers.com/](http://www.javadecompilers.com/) to decompile class files. – Solomon Richards Feb 08 '18 at 11:39
  • I know this service but its for single file conversion I have many .class files any tool which converts multiple .class files to java files? – Sid Feb 08 '18 at 11:43
  • I havn't try this but i guess this will serve your purpose. This is an eclipse plugin https://marketplace.eclipse.org/content/enhanced-class-decompiler – Solomon Richards Feb 08 '18 at 16:40
  • Hi, I tries installing this plug-in but still the structure of files looks same as the shown image in question. @Solomon Richards – Sid Feb 13 '18 at 06:33