Recover Java code from class file

I‘m so careless I deleted a Java web project in eclipse. the only thing I have is a war file which I got from server.

Thanks to Procyon / Java Decompiler, I recovered all java source code from war class file. It‘s really a great tool!

https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler

You can download it from https://bitbucket.org/mstrobel/procyon/downloads

then execute following command to decompile class files in to current directory.

java -jar procyon-decompiler-0.5.27.jar *.class -o .

For spring MVC project, it cannot recover @Autowried annotation, you have to add it manually.

时间: 2024-11-10 03:41:58

Recover Java code from class file的相关文章

How to generate UML Diagrams from Java code in Eclipse

UML diagrams compliment inline documentation ( javadoc ) and allow to better explore / understand a design. Moreover, you can print and bring them to table to discuss a design.In this post, we will install and use the ObjectAid plugin for Eclipse to

HTMLPARSER JAVA CODE

1 /*** 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this f

[转]Java Code Examples for android.util.JsonReader

[转]Java Code Examples for android.util.JsonReader The following are top voted examples for showing how to use android.util.JsonReader. These examples are extracted from open source projects. You can vote up the examples you like and your votes will b

拯救 Java Code Style 强迫症

2018年10月31日 21:20:46 Java架构大数据 阅读数:1更多个人分类: java 架构 linux 程序猿编辑这篇文章缘起于上一个持续交付的咨询项目,当时正在指导客户团队的Java工程师做Code Review,发现一个很有意思的现象:有一位工程师对Code Style特别在意,所以在Code Review的大部分时间中都是该工程师在指出哪里哪里的格式不对,但是团队并没有找到改进方法,每次的结论都是"下次我注意一点."我挺欣赏这位工程师对Code Style的认真态度,

Java学习记录(补充八:Date类;Java流(Stream),文件(File)和IO)

Date类,Calendar类package Box1; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Random; //Date类 public class DateTest { public static void main(String[] args) { Date

JAVA之IO技术File类的使用

package ioTest.io3; /* * File类是对文件和文件夹的抽象. * File类的常见方法: * 1.创建 * createNewFile():在指定的位置创建文件,如果该文件已经存在,则不创建,返回false. * 和输出流对象不一样,输出流对象,只要已建立就创建,如果文件存在,则覆盖. * mkdir():创建此抽象路径名指定的目录 * mkdir():创建此抽象路径名指定的目录,包括所有必需但不存在的父目录. * 2.删除 * delete() * deleteOnEx

【Android XML】Android XML 转 Java Code 系列

最近在公司做一个项目,需要把Android界面打包进jar包给客户使用.对绝大部分开发者来说,Android界面的布局以XML文件为主,并辅以少量Java代码进行动态调整.而打包进jar包的代码,意味着无法通过常规的getResources(),getString()等方法来快速的获取资源,因为这些资源都是在apk安装的时候初始化生成的.为了满足客户的需求,笔者开始在网上寻找各种解决方案.结果如下: 1.apk 主体包方案 实现方法:安装一个新的apk,新apk和主apk使用android:sh

-bash: /root/java/jdk/bin/java: cannot execute binary file

错误 -bash: /root/java/jdk/bin/java: cannot execute binary file 错误原因 安装的Linux的版本是32位的,下载的软件是64位,版本不兼容,需要换一个相同位数的版本 查看Linux的版本 file  /sbin/init 或者  file /bin/ls 这个显示你的版本是32位的 反之则是64位的

The entitlements specified in your application’s Code Signing Entitlements file do not match those s

错误描述 真机测试过程中,更换Provisioning Profile之后,出现错误:The entitlements specified in your application's Code Signing Entitlements file do not match those specified in your provisioning profile. 解决办法 网上的办法有两种: 1.删除Build Settings里面的Code Signing Entitlements的值 2.第二