Import of excuting jar doesn't work in eclipse

84 views Asked by At

I deleted my project permanently and I want to import my old executing .jar into eclipse.

Eclipse import function does not find anything it the jar file.

Can someone give me a tip or recover the file?

Here is a screenshot of eclipse

Thank you

Click here for the file to recover

3

There are 3 answers

0
Shank On BEST ANSWER

You cannot recover the project. You did not set to export source files while exporting, there are only .class files.

For future reference select Export Java source file and resources while exporting the project.

Export Options

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

0
bvyas On

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. I tried this with your attached jar and I am able to import it and able to see the content in it.

0
Rubasace On

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.

The Import option in Eclipse is made for importing .project files, that hold your project's information. 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.