简体   繁体   English

.class转换为.java?

[英].class into .java?

Well, I had just finished coding a java project and went into testing it using eclipse. 好吧,我刚刚完成了对Java项目的编码,并开始使用eclipse对其进行测试。 It was exporting fine and I went ahead and created a new file in src named "config.yml" and it all of a sudden removed all the .java files in my project! 它可以很好地导出,我继续在src中创建了一个名为“ config.yml”的新文件,然后突然删除了我项目中的所有.java文件!

Fortunately, I still have the .jar which contains all the .class files, but I seem to be unable to edit the code (i'm guessing this is to do with it being a .class instead of .java) so, is there any way I can transfer these .classes back to .java ? 幸运的是,我仍然拥有包含所有.class文件的.jar,但是我似乎无法编辑代码(我猜这是因为它是.class而不是.java),所以我可以将这些.class转移回.java的任何方法吗?

btw, if you're recommending any software please note that i'm on a macbook so i'll be limited to what i can use.. 顺便说一句,如果您推荐任何软件,请注意我在Macbook上,因此我将只能使用我的软件。

Try this (JD-GUI). 试试这个 (JD-GUI)。 Have a Mac version and it's nice. 有Mac版本,很好。

It will show to you the code from the class file. 它将向您显示类文件中的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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