10

Running on Linux, I've used launch4j to package an exe.

I copy the exe into my Windows 7 VM, and run it.

And nothing happens.

I run it with --l4j-debug, and nothing still happens (at least, if there's a log file, I cannot find it).

Is there some diagnostic technology that I'm missing here?

bmargulies
  • 97,814
  • 39
  • 186
  • 310

2 Answers2

13

Create a console version of your EXE (in the "Header" tab, change "Header type" from "GUI" to "Console") and run that from a CMD prompt.

Most likely you will see an exception message in the console, and that will explain why your app is failing to start.

finnw
  • 47,861
  • 24
  • 143
  • 221
  • 1
    @finnw I've run the same problem. However, I create exe wrapper using launch4j maven plugin (http://alakai.org/reference/plugins/launch4j-plugin-usage.html). When I define "console" target, the console windows is shown and quickly closed, .log file is generated but there is nothing special in it. Any advice? – dma_k Mar 02 '10 at 20:44
  • 3
    OK, I've solved the problem: I have removed `` configuration entry and it worked smoothly. This is because I already have an "executable" jar, so I don't need to redefine mainclass/manifest. – dma_k Mar 02 '10 at 20:53
-2

The .jar file needs to be an executable JAR file. Make sure it is and try creating the .exe file with the executable jar file. This should solve it!

divya
  • 1