Eclipse删除了我的java和类文件? [英] Eclipse deleted my java and class files?

查看:162
本文介绍了Eclipse删除了我的java和类文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近买了一台新电脑,所以在备份时间胶囊的过程中,重新安装eclipse并重新加载我的项目Eclipse想出了通常的导入Foo无法恢复的错误。我将 / WEB-INF 文件夹添加到类路径,刷新,清理等无济于事。我决定删除该项目(并且不要单击复选框,说明删除光盘上的项目内容)。我使用服务器中的源(在共享计算机上)重置项目。仍然没有快乐,我查看了我的类文件夹,发现它是空的。

I recently bought a new computer so in the process of backing up to time capsule, reinstalling eclipse and reloading my project Eclipse came up with the usual "import Foo cannot be resovled" error. I added my /WEB-INF folder to the classpath, refreshed, cleaned etc to no avail. I decided to delete the project (and DID NOT click the checkbox saying delete project contents on disc). I reset up the project using the sources from my server (on a shared computer). Still having no joy I looked inside my classes folder to find it empty.

所以我跑到我的服务器发现我的类文件夹确实是空的,我去了垃圾桶找不到java或类文件,我对我的mac和我的macbook进行了全面搜索,找不到类或java文件。编译后的类仍在运行,但我担心它们会在下次重启时消失 - 有没有人知道如何获取我的类源代码?他们代表了一年多的工作。我有版本控制但只在这台电脑上。

So I ran to my server to find that indeed my classes folder is empty, I went to the trashcan to find no java or class files, I did a full search of my mac and my macbook to find no class or java files. The compiled classes are still working, but I'm scared that they'll disappear on the next restart - does anyone have any clue how to get my class source code back? They represent over a year of work. I had version control but only on this computer.

推荐答案

首先将.class文件复制到一个单独的文件夹,这样你就赢了也不会丢失它们。

Start with copying the .class files to a separate folder, so you won't lose them too.

尝试使用时间胶囊或其他任何东西来查找备份。

The try to find your backups using time capsule or whatever.

如果全部否则失败,使用工具反编译.class文件。

If all else fails, decompile the .class-files using a tool.

我该怎么办? "反编译" Java类文件?

我不知道它会让你更开心,但你不是第一个神奇地失去某些东西的源代码的人重要的......有或没有备份和版本控制......

I don't know it it makes you more happy, but you are not the first one that magically looses the source code of something important... With or without backups and version control...

这篇关于Eclipse删除了我的java和类文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆