How to get the path to the executable when using launch4j?

前端 未结 5 1498
时光取名叫无心
时光取名叫无心 2020-12-17 22:46

I\'m using launch4j to wrap an executable jar file in my Windows application, but I need to pass references to some of its libraries in through the JVM arguments. The librar

5条回答
  •  囚心锁ツ
    2020-12-17 23:07

    You might add to your launch4j configuration

    ...
    
    ...
    -Djna.library.path="%EXEDIR%\\path\\to\\lib"
    -Djava.library.path="%EXEDIR%\\path\\to\\lib"
    ...
    
    ...
    

    If you need more then a you might seperate several paths by a semikolon as usual.

    < opt> Optional, accepts everything you would normally pass to java/javaw launcher: assertion options, system properties and X options. Here you can map environment and special variables EXEDIR (exe's runtime directory), EXEFILE (exe's runtime full file path) to system properties. All variable references must be surrounded with percentage signs and quoted.

    Source: http://launch4j.sourceforge.net/docs.html

提交回复
热议问题