새소식

Programming/Solving Errors

Java HotSpot(TM) 64-Bit Server VM warning 해결

 

 

에러 내용

 

Java HotSpot(TM) 64-Bit Server VM warning: 
Sharing is only supported for boot loader classes because bootstrap classpath has been appended

 

IntelliJ에서 프로젝트를 실행하면 계속 발생했다.

심지어 항상 뜬다기보다는 어떤 프로젝트에서는 계속 뜨다가 새 프로젝트에서는 안 뜨기도 하고..?

검색해 보니 에러라기보다는 경고 메시지로 실제 실행하고 동작하는 데에는 문제가 없다고 하지만

그냥 저 메시지 자체가 뜨지 않았으면 했다.

 

 

해결 방법

 

많은 사람들이 Settings > Build, Execution, Deployment > Debugger > Async Stack Traces에서

Instrumenting agent의 체크를 해제하는 방법을 소개했는데

난 이미 언체크 상태였고, 당연히 이걸로는 해결되지 않았다.

 

 

 

 

꽤 오랜 시간 검색해서 알아낸 방법을 써보니 해결이 되었는데,

Run/Debug Configurations에 설정을 한가지 추가하는 것이다.

 

Run > Edit Configurations에 들어간다.

 

 

 

VM options에 `-Xshare:off`를 추가한다.

`-ea`는 원래 있어서 그 옆에 추가했다.

 

 

 

적용하고 다시 실행해보면 이제 경고 메시지가 뜨지 않는다.

겨우 찾아낸 방법인데 알려준 분에게 뜨거운 감사의 인사를 전하고 싶다.

 

 

참고

https://stackoverflow.com/questions/65613084/java-hotspottm-64-bit-server-vm-warning-sharing-is-only-supported-for-boot-lo

 

Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has bee

The error message I got while trying to debug my code Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended&quo...

stackoverflow.com

 

 

Contents

Copied URL!

Liked this Posting!