繁体   English   中英

Launch4j Maven集成:传递VM参数(-XX:CompileCommand)

[英]Launch4j Maven integration: Pass VM arguments (-XX:CompileCommand)

我们在Java 8中遇到了与特定的swing方法结合在一起的JIT Bug。 链接 现在我们必须禁用此特定方法的JIT作为launch4j中的vm参数,但我似乎无法将此vm参数传递给maven中的launch4j。 我有以下Maven声明:

        <plugin>
            <groupId>org.bluestemsoftware.open.maven.plugin</groupId>
            <artifactId>launch4j-plugin</artifactId>
            <version>1.5.0.0</version>
            <executions>
                <!-- GUI exe -->
                <execution>
                    <id>l4j-gui</id>
                    <phase>package</phase>
                    <goals>
                        <goal>launch4j</goal>
                    </goals>
                    <configuration>
                        <headerType>gui</headerType>
                        <outfile>target/Launcher_${version}.exe</outfile>
                        <jar>target/${jar.file.withDependencies.name}</jar>
                        <errTitle>Error Title</errTitle>
                        <icon>src/main/resources/icon/icon.ico</icon>
                        <jre>
                            <minVersion>1.7.0</minVersion>
                            <initialHeapSize>128</initialHeapSize>
                            <maxHeapSize>900</maxHeapSize>

                             <!-- Doesn't work... -->
                            <!--<opt>-OmitStackTraceInFastThrow</opt>-->

                        </jre>
                        <versonInfo>
                            <fileVersion>1.0.0.0</fileVersion>
                        </versionInfo>
                    </configuration>
                </execution>
            </executions>
        </plugin>

您应该封装opt元素和opt标签。

就您而言,在jre标记内:

<opts> <opt>-OmitStackTraceInFastThrow</opt> </opts>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM