2

Can I launch my executable with double click in eclipse after exporting? I can't use the jar file which was exported

Farhad Mammadli
  • 469
  • 1
  • 5
  • 15
  • For a command line application, having a double clickable jar doesn't make much sense (the user needs to interact via the command line). A double clickable Jar does make more sense for an application with a UI (using one of the many options - Swing, JavaFX, etc...) – copeg Apr 29 '15 at 16:09
  • Also could use [Launch4j](http://launch4j.sourceforge.net/) See http://stackoverflow.com/questions/4330936/how-can-i-convert-a-jar-to-an-exe – Gerardo Martín Chaves Apr 29 '15 at 16:11
  • @Farhad, I recommend reading some tutorials for how to create a UI, if that's the path you wish to take. Here's a great place to start: http://docs.oracle.com/javase/tutorial/uiswing/ – copeg Apr 29 '15 at 16:11
  • Your title has nothing to do with what it seem your question actually is: 'is it possible to launch .jar file with a double click?` – DrCord Apr 29 '15 at 16:25
  • @copeg I dont need swing now, if it is possible i want to do it with eclipse (now) – Farhad Mammadli Apr 29 '15 at 16:31
  • @Farhad, then I don't understand the problem. You can run this directly through eclipse, or run an exported jar via the command line. What exactly is the problem? – copeg Apr 29 '15 at 16:35

1 Answers1

2

The answer is you can only access it from command line or create a batch file that starts this jar file.

Farhad Mammadli
  • 469
  • 1
  • 5
  • 15