I downloaded a demo jar file, and would like to open it in eclipse. What I did is
import->Existing projects into workspace ->select archive file
However, the eclipse returns "No projects are found to import".
As command line, I type
java -jar projectDemo.jar
This jar file just functions well. So it seems to me that jar file itself is OK, but how can I open it in Eclipse and modify this demo code? Thanks.
If the JAR is added to the build path of your project, you can just click it open in the Package Explorer on the left side of the screen.
Since the jar file 'executes' then it contains compiled java files known as .class files. You cannot import it to eclipse and modify the code. You should ask the supplier of the "demo" for the "source code". (or check the page you got the demo from for the source code)
Unless, you want to decompile the .class files and import to Eclipse. That may not be the case for starters.
use java decompiler. http://jd.benow.ca/. you can open the jar files.
Thanks, Manirathinam.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With