1、今天在敲代码的时候,发现了一个bug:
Error:Internal error: (java.lang.IllegalAccessError) class com.intellij.util.io.FileChannelUtil (in unnamed module @0x3745e5c6) cannot access class sun.nio.ch.FileChannelImpl (in module java.base) because module java.base does not export sun.nio.ch to unnamed module @0x3745e5c6 java.lang.IllegalAccessError: class com.intellij.util.io.FileChannelUtil (in unnamed module @0x3745e5c6) cannot access class sun.nio.ch.FileChannelImpl (in module java.base) because module java.base does not export sun.nio.ch to unnamed module @0x3745e5c6 at com.intellij.util.io.FileChannelUtil.setupUnInterruptibleHandle(FileChannelUtil.java:26) at com.intellij.util.io.FileChannelUtil.<clinit>(FileChannelUtil.java:18) at com.intellij.util.io.ReadWriteDirectBufferWrapper$FileContext$1.execute(ReadWriteDirectBufferWrapper.java:50) at com.intellij.util.io.ReadWriteDirectBufferWrapper$FileContext$1.execute(ReadWriteDirectBufferWrapper.java:42) at com.intellij.openapi.util.io.FileUtilRt.doIOOperation(FileUtilRt.java:945) at com.intellij.util.io.ReadWriteDirectBufferWrapper$FileContext.<init>(ReadWriteDirectBufferWrapper.java:42) at com.intellij.util.io.ReadWriteDirectBufferWrapper.create(ReadWriteDirectBufferWrapper.java:27) at com.intellij.util.io.DirectBufferWrapper.getBuffer(DirectBufferWrapper.java:24) at com.intellij.util.io.ReadWriteDirectBufferWrapper.getBuffer(ReadWriteDirectBufferWrapper.java:16) at com.intellij.util.io.PagedFileStorage$StorageLock.createValue(PagedFileStorage.java:631) at com.intellij.util.io.PagedFileStorage$StorageLock.get(PagedFileStorage.java:558) at com.intellij.util.io.PagedFileStorage$StorageLock.access$500(PagedFileStorage.java:466) at com.intellij.util.io.PagedFileStorage.getBufferWrapper(PagedFileStorage.java:407) at com.intellij.util.io.PagedFileStorage.getBuffer(PagedFileStorage.java:371) at com.intellij.util.io.PagedFileStorage.putInt(PagedFileStorage.java:144) at com.intellij.util.io.ResizeableMappedFile.putInt(ResizeableMappedFile.java:222) at com.intellij.util.io.PersistentEnumeratorBase.markDirty(PersistentEnumeratorBase.java:597) at com.intellij.util.io.PersistentEnumeratorBase.<init>(PersistentEnumeratorBase.java:185) at com.intellij.util.io.PersistentBTreeEnumerator.<init>(PersistentBTreeEnumerator.java:73) at com.intellij.util.io.PersistentEnumeratorDelegate.<init>(PersistentEnumeratorDelegate.java:47) at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:149) at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:138) at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:129) at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:121) at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:114) at org.jetbrains.jps.incremental.storage.AbstractStateStorage.createMap(AbstractStateStorage.java:124) at org.jetbrains.jps.incremental.storage.AbstractStateStorage.<init>(AbstractStateStorage.java:27) at org.jetbrains.jps.incremental.storage.FileTimestampStorage.<init>(FileTimestampStorage.java:27) at org.jetbrains.jps.incremental.storage.ProjectStamps.<init>(ProjectStamps.java:39) at org.jetbrains.jps.incremental.storage.ProjectTimestamps.<init>(ProjectTimestamps.java:19) at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:92) at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:274) at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:130) at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:232) 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:842)
2、这里在参考大佬的文章,找到的答案是:idea2019不支持jdk17
错误:Internal error: (java.lang.IllegalAccessError) class com.intellij.util.io.FileChannelUtil (in unn_error:internal error: (java.lang.illegalaccesserro-CSDN博客
2.1 可以cmd查看一下java -version的资料,那没办法,只好换一个java的版本!!!
2.2 现在我安装jdk的11版本,开始吧!!!安装完了,这里setting修改一下:
3、这里的JDK要调成11,
4、经过调整,idea2019.3版本必须要用,Application2.7.6版本或者更低版本,具体可以参考这篇资料。
Error:java: 错误: 无效的源发行版:13, 类文件具有错误的版本 61.0, 应为 55.0 请删除该文件或确保该文件位于正确的类路径子目录中。-CSDN博客