Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 23c0500

Browse files
committed
Add a workaround for NoClassDefFoundError: sun.management.Util with Java 17
Closes gh-1198
1 parent 38b2ddc commit 23c0500

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import org.springframework.nativex.hint.NativeHint;
2+
import org.springframework.nativex.type.NativeConfiguration;
3+
4+
// See https://github.com/oracle/graal/issues/3875
5+
@NativeHint(options = "-J--add-exports=java.management/sun.management=ALL-UNNAMED")
6+
public class SunManagementHints implements NativeConfiguration {
7+
}

spring-native-configuration/src/main/resources/META-INF/services/org.springframework.nativex.type.NativeConfiguration

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
org.springframework.scheduling.quartz.QuartzHints
22
LoggingInitHints
3+
SunManagementHints
34
com.google.protobuf.ProtobufHints
45
io.lettuce.LettuceHints
56
io.netty.NettyHints

0 commit comments

Comments
 (0)