#117 3.1.0-beta1-linux: ./bin/windres not found


I found 2 issues in 3.1.0-beta1-linux:

1. The ant task does not make the launch4j installation directory the current working directory. Because of this, it is unable to find ./bin/windres, ./bin/ld, ./win32api etc.

2. The folders in the tgz distribution should be rwxr-xr-x but are rwxr-x---. (BTW the owner/group could be improved as well).


  • Scott Plante

    Scott Plante - 2013-03-07

    This occurs when your current directory is not the launch4j directory. Launch4j attempts to find its own install directory by looking on the classpath for launch4j.properties. This is done in Util.java, at the top of the getJarBaseDir() method. It was changed to have these lines:

    URI uri = new URI(Util.class.getClassLoader()

    String path = uri.getPath();

    if (path.startsWith("file:")) {
    String jarPath = path.substring(5, path.lastIndexOf('!'));

    The problem is uri.getPath() does not return the "file:" part for local files--it only returns the path portion of the uri beginning with /. I changed those last two lines to this, and it started working:

    if (path.startsWith("/")) {
    String jarPath = path.substring(0, path.lastIndexOf('!'));

    Note the 5 -> 0 in substring because we don't need to remove file: anymore.

  • Thomas Pasch

    Thomas Pasch - 2013-03-08

    Well, I used 3.1.0-beta1 as drop-in replacement for 3.0.2, where it has worked without problems. Hence this is at least a regression.

    Apart from this I would suggest a solution where it is possible to set a environment variable (let say LANCH4J_HOME) to point to the installation directory. This trick is successfully applied in many projects (ANT_HOME, MAVEN_HOME, or even JAVA_HOME).

  • Grzegorz Kowal

    Grzegorz Kowal - 2013-08-05
    • Priority: 5 --> 3
  • Grzegorz Kowal

    Grzegorz Kowal - 2013-08-05
    • assigned_to: Grzegorz Kowal
  • Marco

    Marco - 2013-08-20


    I have the same problem on my Linux and its really annoying. I have work arounded by placing symlinks to bin, w32api,head into each folder where I am running launch4j.

    I guess it should be easily fixable, since it was working fine in 3.0.x


  • Grzegorz Kowal

    Grzegorz Kowal - 2013-08-20


    Yes, I plan to fix the path issues. 2. point fixed already.


  • Grzegorz Kowal

    Grzegorz Kowal - 2013-08-20

    Fixed both problems, thanks Scott.

  • Grzegorz Kowal

    Grzegorz Kowal - 2013-08-20
    • status: open --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks