当前位置:   article > 正文

错误:Internal error: (java.lang.IllegalAccessError) class com.intellij.util.io.FileChannelUtil (in unn_error:internal error: (java.lang.illegalaccesserro

error:internal error: (java.lang.illegalaccesserror) class com.intellij.util

java项目从8转到17后运行项目出现报错,连运行过程都没有,直接报错

  1. 错误:Internal error: (java.lang.IllegalAccessError) class com.intellij.util.io.FileChannelUtil (in unnamed module @0x60611244) cannot access class sun.nio.ch.FileChannelImpl (in module java.base) because module java.base does not export sun.nio.ch to unnamed module @0x60611244
  2. java.lang.IllegalAccessError: class com.intellij.util.io.FileChannelUtil (in unnamed module @0x60611244) cannot access class sun.nio.ch.FileChannelImpl (in module java.base) because module java.base does not export sun.nio.ch to unnamed module @0x60611244
  3. at com.intellij.util.io.FileChannelUtil.setupUnInterruptibleHandle(FileChannelUtil.java:26)
  4. at com.intellij.util.io.FileChannelUtil.<clinit>(FileChannelUtil.java:18)
  5. at com.intellij.util.io.ReadWriteDirectBufferWrapper$FileContext$1.execute(ReadWriteDirectBufferWrapper.java:50)
  6. at com.intellij.util.io.ReadWriteDirectBufferWrapper$FileContext$1.execute(ReadWriteDirectBufferWrapper.java:42)
  7. at com.intellij.openapi.util.io.FileUtilRt.doIOOperation(FileUtilRt.java:945)
  8. at com.intellij.util.io.ReadWriteDirectBufferWrapper$FileContext.<init>(ReadWriteDirectBufferWrapper.java:42)
  9. at com.intellij.util.io.ReadWriteDirectBufferWrapper.create(ReadWriteDirectBufferWrapper.java:27)
  10. at com.intellij.util.io.DirectBufferWrapper.getBuffer(DirectBufferWrapper.java:24)
  11. at com.intellij.util.io.ReadWriteDirectBufferWrapper.getBuffer(ReadWriteDirectBufferWrapper.java:16)
  12. at com.intellij.util.io.PagedFileStorage$StorageLock.createValue(PagedFileStorage.java:631)
  13. at com.intellij.util.io.PagedFileStorage$StorageLock.get(PagedFileStorage.java:558)
  14. at com.intellij.util.io.PagedFileStorage$StorageLock.access$500(PagedFileStorage.java:466)
  15. at com.intellij.util.io.PagedFileStorage.getBufferWrapper(PagedFileStorage.java:407)
  16. at com.intellij.util.io.PagedFileStorage.getReadOnlyBuffer(PagedFileStorage.java:375)
  17. at com.intellij.util.io.PagedFileStorage.getInt(PagedFileStorage.java:155)
  18. at com.intellij.util.io.ResizeableMappedFile.getInt(ResizeableMappedFile.java:217)
  19. at com.intellij.util.io.PersistentEnumeratorBase.<init>(PersistentEnumeratorBase.java:212)
  20. at com.intellij.util.io.PersistentBTreeEnumerator.<init>(PersistentBTreeEnumerator.java:73)
  21. at com.intellij.util.io.PersistentEnumeratorDelegate.<init>(PersistentEnumeratorDelegate.java:47)
  22. at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:149)
  23. at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:138)
  24. at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:129)
  25. at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:121)
  26. at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:114)
  27. at org.jetbrains.jps.incremental.storage.AbstractStateStorage.createMap(AbstractStateStorage.java:124)
  28. at org.jetbrains.jps.incremental.storage.AbstractStateStorage.<init>(AbstractStateStorage.java:27)
  29. at org.jetbrains.jps.incremental.storage.FileTimestampStorage.<init>(FileTimestampStorage.java:27)
  30. at org.jetbrains.jps.incremental.storage.ProjectStamps.<init>(ProjectStamps.java:39)
  31. at org.jetbrains.jps.incremental.storage.ProjectTimestamps.<init>(ProjectTimestamps.java:19)
  32. at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:92)
  33. at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:274)
  34. at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:130)
  35. at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:232)
  36. at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
  37. at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
  38. at java.base/java.lang.Thread.run(Thread.java:833)

发现是ideal的版本问题,ideal2019不支持jdk17,所以卸载ideal安装新版本

灵感:【Bug记录】Internal error: (java.lang.IllegalAccessError) class com.intellij.util.io.FileChannelUtil_idea2019支持jdk17吗_力巴尔的博客-CSDN博客

卸载教程:idea卸载与重装_idea卸载干净并重新安装_Jennifer33K的博客-CSDN博客

安装教程:IDEA安装教程(傻瓜式安装)_AiLi0617的博客-CSDN博客 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/169281
推荐阅读
相关标签
  

闽ICP备14008679号