native-image Default flavor mapping not found
这是agentlib native-image-agent.exe
的bug,已经有人反馈在GraalVM的issues中,你可以在这个链接中发现其他人也碰到了这个问题:https://github.com/oracle/graal/issues/5369
解决办法
解决办法也很简单,在你通过跟踪代理生成的META-INF/native-image/resource-config.json
中的includes
添加一行:{ "pattern":"\\Qsun/datatransfer/resources/flavormap.properties\\E" }
例如:
{
"resources": {
"includes": [
{ "pattern":"\\Qsun/datatransfer/resources/flavormap.properties\\E" }
]
},
"bundles": [
{
"name": "sun.awt.resources.awt",
"classNames": [
"sun.awt.resources.awt",
"sun.awt.resources.awt_zh_CN"
]
}
]
}
再重新生成可执行文件发现已经ok了