jira-importer opened a new issue, #469:
URL: https://github.com/apache/maven-jlink-plugin/issues/469

   **[Yasumasa 
Suenaga](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER304159)**
 opened 
**[MJLINK-79](https://issues.apache.org/jira/browse/MJLINK-79?redirect=false)** 
and commented
   
   I configured maven-jlink-plugin as following:
   
   ```java
   <addOptions>
       <addOption>-XX:+HeapDumpOnOutOfMemoryError</addOption>
       <addOption>-XX:+UseParallelOldGC</addOption>
   </addOptions> 
   ```
   
   I saw following error when I run jlink'ed binary:
   
   ```java
   $ ./target/maven-jlink/classifiers/linux-amd64/bin/test
   Unrecognized VM option 'HeapDumpOnOutOfMemoryError -XX:+UseParallelOldGC'
   Error: Could not create the Java Virtual Machine.
   Error: A fatal exception has occurred. Program will exit. 
   ```
   
   JLinkMojo.java would quote option string like 
   
   ```
   String.format("\"%s\"", String.join(" ", addOptions))
   ```
   
   However it should not do that because jlink would run jlink implementation 
which comes from ToolProvider, not on the shell.
   
   
   ---
   
   **Affects:** 3.2.0
   
   **Issue Links:**
   - [MJLINK-85](https://issues.apache.org/jira/browse/MJLINK-85) Wrong quoting 
of jlink command line
   
   
   **Remote Links:**
   - [GitHub Pull Request #196
   ](https://github.com/apache/maven-jlink-plugin/pull/196)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to