简体   繁体   中英

Synchronize java source from jar file

Accidentally i formatted disk with good java source, so now i have old java source and compiled jar file, can i somehow synchronize thems together?

  1. I need get java source from jar file
  2. How to synchronize with existing project in eclipse

If you have packaged sources in your jar, you can extract them with any file extractor (like 7zip ) from the src folder inside the jar file.

Otherwise you can use a Java Decompiler, this one has a GUI version too. The second method will not recover your comments/javadoc comments.

Another method would be to use a disk recovery software, but that will only work if you didn't "securely erase" the files on your partition, as the files are still in the disk, just not indexed, and the recovery rate of this method is very low. You can check testdisk and photorec for this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM