首页 > 其他分享 >在mobaxten上使用scala报错

在mobaxten上使用scala报错

时间:2024-04-27 19:33:59浏览次数:24  
标签:java ILoop scala mobaxten nsc 报错 interpreter tools

查看报错信息

[ERROR] Failed to construct terminal; falling back to unsupported
java.io.IOException: Cannot run program "sh": CreateProcess error=2, 系统找不到指定的文件。

点击查看代码
  27/04/2024   18:52.17   /home/mobaxterm  scala
Welcome to Scala 2.11.12 (Java HotSpot(TM) 64-Bit Server VM, Java 22.0.1).
Type in expressions for evaluation. Or try :help.
[ERROR] Failed to construct terminal; falling back to unsupported
java.io.IOException: Cannot run program "sh": CreateProcess error=2, 系统找不到指定的文件。
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
        at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:308)
        at jline.internal.TerminalLineSettings.stty(TerminalLineSettings.java:282)
        at jline.internal.TerminalLineSettings.get(TerminalLineSettings.java:143)
        at jline.internal.TerminalLineSettings.<init>(TerminalLineSettings.java:108)
        at jline.internal.TerminalLineSettings.getSettings(TerminalLineSettings.java:123)
        at jline.UnixTerminal.<init>(UnixTerminal.java:60)
        at jline.UnixTerminal.<init>(UnixTerminal.java:50)
        at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
        at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:132)
        at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:259)
        at java.base/java.lang.Class.newInstance(Class.java:755)
        at jline.TerminalFactory.getFlavor(TerminalFactory.java:211)
        at jline.TerminalFactory.getFlavor(TerminalFactory.java:196)
        at jline.TerminalFactory.create(TerminalFactory.java:82)
        at jline.TerminalFactory.get(TerminalFactory.java:186)
        at jline.TerminalFactory.get(TerminalFactory.java:192)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:243)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:235)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:223)
        at scala.tools.nsc.interpreter.jline.JLineConsoleReader.<init>(JLineReader.scala:64)
        at scala.tools.nsc.interpreter.jline.InteractiveReader.<init>(JLineReader.scala:33)
        at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$scala$tools$nsc$interpreter$ILoop$$instantiater$1$1.apply(ILoop.scala:858)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$scala$tools$nsc$interpreter$ILoop$$instantiater$1$1.apply(ILoop.scala:855)
        at scala.tools.nsc.interpreter.ILoop.scala$tools$nsc$interpreter$ILoop$$mkReader$1(ILoop.scala:862)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$22$$anonfun$apply$10.apply(ILoop.scala:873)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$22$$anonfun$apply$10.apply(ILoop.scala:873)
        at scala.util.Try$.apply(Try.scala:192)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$22.apply(ILoop.scala:873)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$22.apply(ILoop.scala:873)
        at scala.collection.immutable.Stream.map(Stream.scala:418)
        at scala.tools.nsc.interpreter.ILoop.chooseReader(ILoop.scala:873)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1$$anonfun$newReader$1$1.apply(ILoop.scala:893)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.newReader$1(ILoop.scala:893)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.scala$tools$nsc$interpreter$ILoop$$anonfun$$preLoop$1(ILoop.scala:897)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1$$anonfun$startup$1$1.apply(ILoop.scala:964)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:990)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:891)
        at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:891)
        at scala.reflect.internal.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:97)
        at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:891)
        at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:74)
        at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:87)
        at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:98)
        at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:103)
        at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
Caused by: java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。
        at java.base/java.lang.ProcessImpl.create(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:500)
        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
        ... 50 more
scala>                                       

解决方法

在cmd后面加上 c:/


  27/04/2024   18:54.47   /home/mobaxterm  cmd c:/
Microsoft Windows [版本 10.0.22631.3447]
(c) Microsoft Corporation。保留所有权利。

C:\Users\hmmm\AppData\Local\Temp\Mxt222\tmp\home_hmmm>scala
Welcome to Scala 2.11.12 (Java HotSpot(TM) 64-Bit Server VM, Java 22.0.1).
Type in expressions for evaluation. Or try :help.

scala> var x = 2+2
x: Int = 4

scala>   // 成功

标签:java,ILoop,scala,mobaxten,nsc,报错,interpreter,tools
From: https://www.cnblogs.com/humlogs/p/18162367

相关文章

  • 搭建单机版伪分布式Hadoop+Scala+spark
    搭建单机版伪分布式Hadoop+Scala+spark修改ip[root@master~]#nmcliconnectionaddifnameens32con-nameens32autoconnectyesipv4.methodmanualipv4.gateway192.168.130.2ipv4.addresses192.168.130.102/24ipv4.dns114.114.114.114[root@master~]#nmcliconu......
  • pip成功安装gdal的whl文件后,PyCharm仍报错No module named ‘osgeo’
    在根据网上的教程,成功pipinstall对应的whl文件后,发现PyCharm仍然显示无法调用osgeo。出现这样的问题,首先关注自己使用的环境,例如我使用的环境是(见下图)但当我打算卸载gdal库后,发现gdal安装的环境地址和我使用的环境地址不同(如下图)啊,原来是安装gdal的环境地址搞错了,我自己使......
  • 关于ida f5时报错lumina无法连接到云服务器的问题
    在用ida的时候不知道怎么回事突然就f5不了了,报错 Decompilationfailure:4005F7:cloud:ServerisnotavailablePleaserefertothemanualtofindappropriateactions lumina:connect:由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。4005F......
  • PaddleSeg2.8训练验证时报错[Hint: Expected axis >= -rank && axis < rank == true,
    1.报错问题ValueError:(InvalidArgument)Theaxisisexpectedtobeinrangeof[0,0),butgot0[Hint:Expectedaxis>=-rank&&axis<rank==true,butreceivedaxis>=-rank&&axis<rank:0!=true:1.]2.解决办法上述报错问题是在......
  • SpringBoot+MyBatisPlus报错 Invalid value type for attribute 'factoryBeanObjectTy
    依赖版本org.springframework.boot:spring-boot-starter-web:3.2.5com.baomidou:mybatis-plus-boot-starter:3.5.5错误Invalidvaluetypeforattribute'factoryBeanObjectType'问题原因:这个问题是由于依赖传递导致,在MyBatis起步依赖中的myBatis-spring版本过低,导致程......
  • 代码报错不用愁,CodeGeeX一键完成代码修复、错误解释的功能上线了!
    作为一名开发者,你一定遇到过在编写代码时出现的各种错误。这些错误可能是语法错误、运行时错误或者逻辑错误。处理这些错误通常需要花费大量的时间和精力,特别是当你对错误的原因一无所知时。CodeGeeX的v2.7.4版本最新上线的代码修复和错误解释功能,让你在解决代码错误的问题上,变得......
  • Vetur can't find `tsconfig.json` or `jsconfig.json` in *****报错
    解决Vscode报错[Veturcan‘tfind‘tsconfig.json‘or‘jsconfig.json‘] 报错原因翻译一下报错信息,"Vetur找不到tsconfig.json文件或者jsconfig.json文件".首先Vetur只会扫描项目的根目录下的jsconfig或者tsconfig,如果没有这两个文件之一,就会报错.如果你是通过vue-c......
  • npm install 安装插件报错
    1、npminstall@ant-design/charts--save  报错 npmERR!codeERR_SOCKET_TIMEOUTnpmERR!networkSockettimeoutnpmERR!networkThisisaproblemrelatedtonetworkconnectivity.npmERR!networkInmostcasesyouarebehindaproxyorhavebadnetwo......
  • 处理报错 ResizeObserver loop completed with undelivered notifications.
    //处理报错ResizeObserverloopcompletedwithundeliverednotifications.exportconsthandlerResizeObserverError=()=>{constdebounce=(callback:(...args:any[])=>void,delay:number)=>{lettid:any;returnfunction(...args:an......
  • v-for 循环时直接使用 v-model 绑定报错
    报错信息:Youarebindingv-modeldirectlytoav-foriterationalias.Thiswillnotbeabletomodifythev-forsourcearraybecausewritingtothealiasislikemodifyingafunctionlocalvariable. 错误代码<divv-for="(item,index)indata":key......