The Unix shell script included in the Launch4j distribution version 3.0.2 changes the working directory to the directory of the script before running launch4j.jar and changes back to the old directory before it exits. This has the effect that the return value of launch4j.jar is not returned by the script, but the return value of the last cd command.
As far as I can see, it is not necessary to change the working directory for launching launch4j.jar. Attached is a modified version of the script, which does not do it. It tested that it works fine for me.
Log in to post a comment.