jar文件可以反编译得到原始源吗?

发布于 2024-11-27 03:19:42 字数 176 浏览 5 评论 0原文

我有一个发生在我身上的重大问题。我正在编写一个程序,花了我 3 个月多的时间才完成,今天我不小心删除了源代码。

我正在 NetBeans 中工作,我刚刚清理并构建了它,所以我仍然有工作的 .jar 文件。该程序保存在闪存驱动器上,而不是我的计算机上,因此这些类不在回收站中。

谁能告诉我如何取回我的源代码?

I have a major problem that happened to me. I am writing a program that has taken me 3 months+ to make and today I accidentally deleted the source code.

I am working in NetBeans and I had just cleaned and built it, so I still have the working .jar file. The program was saved on a flash drive, not my computer, so the classes are not in the recycling bin.

Can anyone tell me about how I can go about getting my source code back?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

云淡风轻 2024-12-04 03:19:42

除非您将源代码显式打包到 JAR 文件中,否则无法恢复原始源代码。您可以尝试使用反编译器(例如 this),但这很难为您提供漂亮的可读代码。

最好的解决方案是立即停止使用计算机。然后使用恢复工具恢复已删除的文件。删除的时间越晚,您将其恢复的机会就越大。有很多工具可以用来做到这一点(只需谷歌一下)。

Unless you explicitly packaged your source code in the JAR file, there's no way to get back the original source. You could try using a decompiler (like this) but that will hardly give you nice, readable code.

The best solution would be to stop using your computer right now. Then use a recovery tool to recover your deleted files. The more recently it was deleted, the higher the chance you'll get it back. There are lots of tools that can be used to do this (just Google it).

故笙诉离歌 2024-12-04 03:19:42

您可以使用反编译器(请参阅如何反编译整个 Jar 文件? )但你不会得到“原始”源。

You can use a decompiler ( see How to decompile a whole Jar file? ) but you won't be getting "original" source back.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文