警告: Failed to save history 已解决
记录错误:警告: Failed to save history
第一节早八scala上机课,开始练习,当我敲下
var i = 5
时,直接报错给我整不会了。错误如下
警告: Failed to save history
java.nio.file.AccessDeniedException: C:\Users\Ywei\.scala_history_jline3
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:230)
at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
at java.nio.file.Files.newOutputStream(Files.java:216)
at java.nio.file.Files.newBufferedWriter(Files.java:2860)
at java.nio.file.Files.newBufferedWriter(Files.java:2896)
at org.jline.reader.impl.history.DefaultHistory.internalWrite(DefaultHistory.java:230)
at org.jline.reader.impl.history.DefaultHistory.save(DefaultHistory.java:219)
at org.jline.reader.impl.history.DefaultHistory.add(DefaultHistory.java:384)
at org.jline.reader.impl.LineReaderImpl.finish(LineReaderImpl.java:1140)
at org.jline.reader.impl.LineReaderImpl.finishBuffer(LineReaderImpl.java:1109)
at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:689)
at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:468)
at scala.tools.nsc.interpreter.jline.Reader.readOneLine(Reader.scala:44)
at scala.tools.nsc.interpreter.shell.InteractiveReader.readLine(InteractiveReader.scala:38)
at scala.tools.nsc.interpreter.shell.InteractiveReader.readLine$(InteractiveReader.scala:38)
at scala.tools.nsc.interpreter.jline.Reader.readLine(Reader.scala:34)
at scala.tools.nsc.interpreter.shell.ILoop.readOneLine(ILoop.scala:451)
at scala.tools.nsc.interpreter.shell.ILoop.loop(ILoop.scala:456)
at scala.tools.nsc.interpreter.shell.ILoop.run(ILoop.scala:968)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:87)
at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:91)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:103)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:108)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
解决方式
根据提示
java.nio.file.AccessDeniedException: C:\Users\Ywei\.scala_history_jline3
报了一个异常访问的错误,程序员的优良传统见红就删,直接打开提示路径
C:\Users\Ywei
找到.scala开头的文件,删了就行。
后续使用就正常了
不用担心,.scala文件删除后后续会重新生成,该咋用咋用
本文转载自: https://blog.csdn.net/weixin_51012667/article/details/126965220
版权归原作者 小小菜鸟plus 所有, 如有侵权,请联系我们删除。
版权归原作者 小小菜鸟plus 所有, 如有侵权,请联系我们删除。