how to set jdk.attach.allowAttachSelf=true globally

后端 未结 1 1932
遥遥无期
遥遥无期 2021-02-05 11:32

I am trying to move one of our systems from java 8 to java 9 and about one third of the unit tests that worked OK in java 8 fails with the error below:

java.io.I         


        
相关标签:
1条回答
  • 2021-02-05 12:14

    My tests were running using surefire plugin, If said vm argument added in argline, then test started working.

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <version>2.14.1</version>
         <configuration>
           <argLine>-Djdk.attach.allowAttachSelf=true </argLine>
         </configuration>
    </plugin>
    
    0 讨论(0)
提交回复
热议问题