0

I am using an instrumented JRE environment with Xbootclasspath to specify the path of a library the JRE used. Here is my pom.xml

                <execution>
                    <id>example</id>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                    <configuration>
                        <executable>/path/to/jre/bin/java</executable>
                        <arguments>
                            <argument>-Xbootclasspath/a:/path/to/lib</argument>
                            <argument>-h</argument>
                        </arguments>
                    </configuration>
                </execution>

This always fails for unable to start the VM

[DEBUG] Executing command line: [/path/to/jre/bin/java, -Xbootclasspath/a:/path/to/lib}, -h]
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: edu/columbia/cs/psl/phosphor/struct/TaintedWithObjTag
[ERROR] Command execution failed.

However, when I am using it from the command line, it can execute successfully. mvn exec:exec -Dexec.executable=/path/to/jre/bin/java -Dexec.args="-Xbootclasspath/a:/path/to/lib -h"

Qoros
  • 493
  • 7
  • 16

1 Answers1

0

there is a typo in your pom, an extra "}".

<arguments>
    <argument>-Xbootclasspath/a:/path/to/lib</argument>
    <argument>-h</argument>
</arguments>
Luc
  • 1,393
  • 1
  • 6
  • 14