Need to export clickable and executable file in eclipse. Simple exporting does not launch the program. How to get a clickable jar?
- what exactly did u try search in google ??Srinath Ganesh– Srinath Ganesh2015-04-29 14:02:57 +00:00Commented Apr 29, 2015 at 14:02
- there are two types of jar 1) normal jar of libraries jar 2) another is executable jarSrinath Ganesh– Srinath Ganesh2015-04-29 14:03:51 +00:00Commented Apr 29, 2015 at 14:03
- You should probably read this: docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.htmlVirginie– Virginie2015-04-29 14:05:23 +00:00Commented Apr 29, 2015 at 14:05
- Srinath, "How to create runnable file from eclipse." Could you create and show me your result ?Farhad Mammadli– Farhad Mammadli2015-04-29 14:06:37 +00:00Commented Apr 29, 2015 at 14:06
- Try this: help.eclipse.org/luna/…Ian2thedv– Ian2thedv2015-04-29 14:09:09 +00:00Commented Apr 29, 2015 at 14:09
3 Answers
You should click file, then click export, then click java and save it as runnable jar file.
To run the .jar file, open cmd or terminal, make sure you are in the right path and
type java -jar <jar-file-name>.jar
Note if you cant run it, mostly its your file path not correct

4 Comments
Main-Class in MANIFEST file, or run as java -cp <jarfile> <package.mainClass>: docs.oracle.com/javase/tutorial/deployment/jar/appman.htmlTry to go in brief using the below link : http://www.wikihow.com/Create-an-Executable-File-from-Eclipse
7 Comments
The code listing represents a command prompt application; you can only make it do anything when physically run on the command prompt / shell itself, especially because it expects user input that way. The reason why turning the given program into an executable jar will result in "nothing" happening when you double click it, is because under Windows the default binding for the 'jar' filetype will be setup to run through javaw.exe - and javaw.exe is designed to not open up any command prompt.
In order to make a program be able to run without the command prompt so you only have to double click on it, you will need to get rid of the command prompt interface and instead build a proper graphical user interface, using for example JavaFX or Swing.