ojdkbuild / ojdkbuild

Community builds using source code from OpenJDK project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support additional arguments in Windows' context menu

kien-truong opened this issue · comments

The current Windows build creates a context menu to launch jar file with the following value

"C:\Program Files\ojdkbuild\java-1.8.0-openjdk-1.8.0.222-2\jre\bin\javaw.exe" -jar "%1"

When you launch a jar file, this will only pass in the path without any arguments, which makes some program fail to start, such as Ubiquiti Unifi Controller. In order to support additional arguments, the registry entry should be changed to

"C:\Program Files\ojdkbuild\java-1.8.0-openjdk-1.8.0.222-2\jre\bin\javaw.exe" -jar "%1" %*

Thanks for the report! I haven't realized, that additional arguments may be useful for .jar association. I will add this change to the upcoming release. I assume there is no need to have a quotes around %* in this case (quotes are likely needed only when using %* in batch files)?

The %* must not be quoted here, otherwise Windows will pass all additional arguments as a single second argument.

This was added to 8u232, 11.0.5 and 13.0.1, closing the issue.