Internal error (java.lang.reflect.InaccessibleObjectException): Unable to make protected void java.util.ResourceBundle.setParent(java.util.ResourceBundle) accessible: module java.base does not "opens java.util" to unnamed module @7ee955a8 java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.util.ResourceBundle.setParent(java.util.ResourceBundle) accessible: module java.base does not "opens java.util" to unnamed module @7ee955a8 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199) at java.base/java.lang.reflect.Method.setAccessible(Method.java:193) at com.intellij.util.ReflectionUtil.makeAccessible(ReflectionUtil.java:253) at com.intellij.util.ReflectionUtil.getDeclaredMethod(ReflectionUtil.java:270) at com.intellij.DynamicBundle.<clinit>(DynamicBundle.java:28) at org.jetbrains.jps.incremental.scala.InitialScalaBuilder.getPresentableName(InitialScalaBuilder.scala:26) at org.jetbrains.jps.incremental.IncProjectBuilder.lambda$sendElapsedTimeMessages$3(IncProjectBuilder.java:451) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.concurrent.ConcurrentHashMap$EntrySpliterator.forEachRemaining(ConcurrentHashMap.java:3652) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) at org.jetbrains.jps.incremental.IncProjectBuilder.sendElapsedTimeMessages(IncProjectBuilder.java:454) at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:425) at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:183) at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:132) at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:302) at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:132) at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:219) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)
这篇文章记录一下,自己 电脑使用java17 之后,idea 启动项目报的bug.. 就是上面这个bug,解决办法
再idea 启动类的地方添加如下参数
--add-opens java.base/java.lang=ALL-UNNAMED
参考文章:https://blog.csdn.net/keep_learn/article/details/120396667