AshYosh
Posts: 2
Joined: Wed Jan 20, 2021 12:43 pm

Passing option "--add-exports" to java product

Hello,

I have an Advanced Installer 15.6 project with java app running with Java 14. Main JAR is non-modular so it recoginized in runtime as unnamed module. Is it possible to pass "--add-exports" command line option to java.exe when my jar is started by launcher? For example I need to pass: "--add-exports java.base/jdk.internal.ref=ALL-UNNAMED" option.

I tried to add this option to "JVM parameters" in "Java Products" tab but got "JNI Exception: Failed to create the Java VM" when app started.
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Passing option "--add-exports" to java product

Hello and welcome to our forums,

Could you please try to pass the parameters as it follows:

Code: Select all

--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED
and let me know if it works as expected?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AshYosh
Posts: 2
Joined: Wed Jan 20, 2021 12:43 pm

Re: Passing option "--add-exports" to java product

It works. Thank you very much for your help, Catalin!
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Passing option "--add-exports" to java product

You are always welcome!

I am really glad everything works as expected now.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”