3.5 crash with JAVA_TOOL_OPTIONS containing quotes
Brought to you by:
grzegok
We updated launch4j from 3.14 to 3.5 via the gradle plugin.
We noticed that our app now crashes with a segmentation fault when used from our CI.
The investigation so far has shown that the crash only happens if JAVA_TOOL_OPTIONS is set to specific values.
Concretely, everything works fine in a shell script like this:
JAVA_TOOL_OPTIONS='-Djavax.net.ssl.trustStore=D:/path/to/custom_cacerts'
/path/to/app.exe
But it crashes with a segmentation fault when setting this:
JAVA_TOOL_OPTIONS='-Djavax.net.ssl.trustStore=D:/path/to/custom_cacerts -Danything="C:\minimized"'
/path/to/app.exe
With version 3.50, I have no problem if apostrophes are used but I do have a problem when quotes are used. Of course, neither apostrophes nor quotes are necessary but some people don't care.
This works in 3.50
set JAVA_TOOL_OPTIONS='something in the way'
This also works in 3.50 but it's DOS insanity
set JAVA_TOOL_OPTIONS=something in the way
This does not work in 3.50
set JAVA_TOOL_OPTIONS="something in the way"
Last edit: Jeffrey Holt 2024-12-20