简体   繁体   English

导入Exacting Jar在Eclipse中不起作用

[英]Import of excuting jar doesn't work in eclipse

I deleted my project permanently and I want to import my old executing .jar into eclipse. 我永久删除了我的项目,我想将旧的执行中的.jar导入eclipse中。

Eclipse import function does not find anything it the jar file. Eclipse导入功能在jar文件中找不到任何内容。

Can someone give me a tip or recover the file? 有人可以给我小费或找回文件吗?

Here is a screenshot of eclipse 这是eclipse的截图

Thank you 谢谢

Click here for the file to recover 点击此处恢复文件

I am curious to know if it's jar why do you want to import as a project? 我很好奇,如果您想将其导入为项目,这是否很容易? You can import external jar as a "APP Client Jar File" which is under Java EE. 您可以将外部jar导入为Java EE下的“ APP客户端Jar文件”。 I tried this with your attached jar and I am able to import it and able to see the content in it. 我用您随附的jar进行了尝试,可以导入它并可以查看其中的内容。

You cannot recover the project. 您无法恢复该项目。 You did not set to export source files while exporting, there are only .class files. 您没有设置在导出时导出源文件,只有.class文件。

For future reference select Export Java source file and resources while exporting the project. 供将来参考Export Java source file and resources在导出项目时选择“ Export Java source file and resources ”。

导出选项

Reference: http://www.albany.edu/faculty/jmower/geog/gog692/ImportExportJARFiles.htm 参考: http : //www.albany.edu/faculty/jmower/geog/gog692/ImportExportJARFiles.htm

You are mixing a few things. 您正在混合一些东西。 If you deleted your project source you won't be able to recover it unless you decompile it, and it will be obfuscated even though. 如果删除了项目源,则除非对它进行反编译,否则将无法恢复它,即使它被混淆了。

What you have is the compiled project, resulting from taking your source (.java) and compiling it to .class files. 您拥有的是已编译项目,是通过获取源(.java)并将其编译为.class文件而得到的。

The Import option in Eclipse is made for importing .project files, that hold your project's information. Eclipse中的Import选项用于导入.project文件,该文件保存了项目的信息。 Also you could create a new project from your existing code but as far as I know you just can't create/recover a project from it's compiled jar. 同样,您可以从现有代码创建一个新项目,但是据我所知,您只是无法从已编译的jar创建/恢复项目。

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

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