• Post Reply Bookmark Topic Watch Topic
  • New Topic

Regaining original java project structure from .class file which is available as java decompiler ..  RSS feed

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a java project, which is available as a .class file. i have decompile it from the java decompiler and i can see the java code.
i have lost the original code, is there any method to get the original java project structure back.
 
Marshal
Posts: 4053
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A class file represents a single Java file, not a project. What project structure are you referring to?
 
premchand Singh
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meant all my java classes in my project are in the format of .class file. I have taken those files in Java decompiler. I want all new java files should be structerd as a project as it was in original.
 
Ranch Hand
Posts: 614
9
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this is the case, only way to get the structure back is to save the Java files indivisually and put them in their respective packages.

NOTE: I have seen some class files are not decompiled properly, leaving "???" instead of Java code in few positions.
 
Tim Cooke
Marshal
Posts: 4053
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is not possible.

I recommend in future that you regularly backup your Java projects.
 
Tim Cooke
Marshal
Posts: 4053
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could determine the directory structure based on the package name, but I don't know of any tool that will do this automatically for you.
 
premchand Singh
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Tim Cooke and Tapas Chand .......Thanks for your information
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!