-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SBT Scala Console no longer works on Windows 7 #141
Comments
I'm pretty sure this was broken in commit 9c48a9c. Specifically around line 170 in the SBTConsoleTopComponent.scala file where -Djline.terminal is added to the sbt args. |
After some searching I discovered that it was expecting 'sh' command to be on the path. I just added the Cygwin bin directory to the path and everything worked fine. I guess previous versions did not have this requirement. |
Hi mkelly1495 Thanks. |
Hello, Just add the Cygwin bin directory to the PATH environment variable (use the OS environment variables dialog). Make sure to restart netbeans after changing the environment variable. Then it should work. Good luck. Mike Kelly
|
Hi mkelly1495 Thanks for your kindly reply. Thanks.
|
Why is this closed? Cygwin isn't a requirement for this plugin. This source setting the terminal type to unix on a windows machine causes jline to call sh instead of using the windows counter parts. This is broken. How do reopen? If confirmed, I can create a pull request. |
It should not be closed. Cygwin is not a requirement. Now I am forced to install cygwin. The Scala netbeans plugin is terribly broken. Even the official Scala team does not support Netbeans (an awesome IDE in my opinion). Hopefully someone will join hands with the developer to make it better. |
@dcaoyuan might not be seeing these messages. @amitabh123 please try to be nice. This plugin and @dcaoyuan has treated me very well professionally and personally on my Scala journey. |
@mgenereu, please don't get me wrong. I am really impressed by and grateful to @dcaoyuan for the awesome plugin he has created. What annoys me is that apart from him, there seems to be not many people interested in developing this plugin. The Scala team does not even "officially" support it. I have tried the officially supported ones and this NB plugin (despite its bugs) is much better! I'm just worried about the future of this plugin. |
Don't worry, I'll push this plugin moving forward, since I'm using it everyday. |
I'm going to see how far I can get in finding out the change that started requiring 'sh'. It may be just for Linux or need to be removed. |
And thank you, @dcaoyuan ! |
@dcaoyuan since you are reading this, a but unrelated, but can we please get Ant support back for Scala? SBT is a beast and has many quirks. |
@mgenereu Please see my comment from May 2015 where I identified the commit that broke this. |
@amitabh123 Ant does not support incremental compiling |
@dcaoyuan a personal thanks for creating the plugin. My Scala journey would have been impossible without it. Please keep up the good work. Also, I've more or less moved to Linux and the plugin is much more stable there. |
Still working on getting the plugin to compile on Windows. Tried doing it all from NetBeans itself but I got errors. Tried installing Maven on Windows and it's having trouble finding Java. Will keep at it. Anyone want to help me, please chime in. |
@tyrius02 Would you mind giving me a hand? We could collaborate on a VM? |
@dcaoyuan Regarding the Ant support, while I agree that sbt is better for incremental builds, lots of older projects are ant based and it will be good to have both. Is it too much work? I guess the ant components won't be changing a lot. |
@mgenereu I can certainly help. I'm not using Scala much these days but I do try to keep my ear to the ground and I dislike the IntelliJ solution enough that I'm more than willing to help out on an alternative. |
@dcaoyuan Is there an ETA on when the plug-in will be verified with NB 8.2? |
@tyrius02 Is there a way to contact you directly? |
I think I have a workable solution but I'm having a bit of a hard time testing it out. When I run or debug the plug-in without my changes NB complains to me about stuff. I've got my changes sitting in a fork of the repo: https://github.com/tyrius02/nbscala. |
I have a working solution to the problem in my fork. After reading the source code for jline it became apparent that it is unnecessary to pass -Djline.terminal unless you really want the UnsupportedTerminal. On Windows jline will use WindowsTerminal, else it'll use UnixTerminal. If either fail it'll fall back to UnsupportedTerminal. I've tested this out on both Windows and Linux (Ubuntu 16.04) and it seems to work. I don't have access to a Mac so I cannot test it out there. I did run into one problem. When I create a new SBT project or open an existing one I get this error: java.lang.IllegalStateException: Problem in some module which uses Window System: Window System API is required to be called from AWT thread only, see http://core.netbeans.org/proposals/threading/ |
This last problem is addressed by issue #176 . |
Previous version of the SBT Console worked fine on Windows 7. However, version 1.7.0.0 of the SBT Project module produces the following error when an SBT Console is opened:
SBT -Completion: -Exit: exit -Help: help.
sbt-launch=C:\Users\biowatch\AppData\Roaming\NetBeans\8.0\modules\ext\org.netbeans.libs.sbt\1\org-scala-sbt\sbt-launch.jar
[ERROR] Failed to construct terminal; falling back to unsupported
java.io.IOException: Cannot run program "sh": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:183)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:173)
at jline.internal.TerminalLineSettings.stty(TerminalLineSettings.java:168)
at jline.internal.TerminalLineSettings.get(TerminalLineSettings.java:72)
at jline.internal.TerminalLineSettings.(TerminalLineSettings.java:52)
at jline.UnixTerminal.(UnixTerminal.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at jline.TerminalFactory.getFlavor(TerminalFactory.java:168)
at jline.TerminalFactory.create(TerminalFactory.java:66)
at jline.TerminalFactory.get(TerminalFactory.java:159)
at sbt.ConsoleLogger$.ansiSupported(ConsoleLogger.scala:85)
at sbt.ConsoleLogger$.(ConsoleLogger.scala:79)
at sbt.ConsoleLogger$.(ConsoleLogger.scala)
at sbt.GlobalLogging$.initial(GlobalLogging.scala:43)
at sbt.StandardMain$.initialGlobalLogging(Main.scala:60)
at sbt.StandardMain$.initialState(Main.scala:69)
at sbt.xMain.run(Main.scala:28)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:19)
at xsbt.boot.Boot$.runImpl(Boot.scala:44)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 32 more
[info] Loading project definition from C:\Users\biowatch\Documents\Projects\STT\Web\stt-server\project
[info] Set current project to STT Server (in build file:/C:/Users/biowatch/Documents/Projects/STT/Web/stt-server/)
[ERROR] Failed to construct terminal; falling back to unsupported
java.io.IOException: Cannot run program "sh": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:183)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:173)
at jline.internal.TerminalLineSettings.stty(TerminalLineSettings.java:168)
at jline.internal.TerminalLineSettings.get(TerminalLineSettings.java:72)
at jline.internal.TerminalLineSettings.(TerminalLineSettings.java:52)
at jline.UnixTerminal.(UnixTerminal.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at jline.TerminalFactory.getFlavor(TerminalFactory.java:168)
at jline.TerminalFactory.create(TerminalFactory.java:66)
at jline.TerminalFactory.get(TerminalFactory.java:159)
at sbt.JLine$.sbt$JLine$$terminal(LineReader.scala:82)
at sbt.JLine$.withTerminal(LineReader.scala:85)
at sbt.JLine$.usingTerminal(LineReader.scala:93)
at sbt.JLine$.createReader(LineReader.scala:99)
at sbt.FullReader.(LineReader.scala:129)
at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:163)
at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:160)
at sbt.Command$$anonfun$command$1$$anonfun$apply$1.apply(Command.scala:29)
at sbt.Command$$anonfun$command$1$$anonfun$apply$1.apply(Command.scala:29)
at sbt.Command$.process(Command.scala:92)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.State$$anon$1.process(State.scala:184)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.MainLoop$.next(MainLoop.scala:98)
at sbt.MainLoop$.run(MainLoop.scala:91)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
at sbt.Using.apply(Using.scala:24)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
at sbt.MainLoop$.runLogged(MainLoop.scala:24)
at sbt.StandardMain$.runManaged(Main.scala:53)
at sbt.xMain.run(Main.scala:28)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:19)
at xsbt.boot.Boot$.runImpl(Boot.scala:44)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 52 more
[ERROR] Failed to construct terminal; falling back to unsupported
java.io.IOException: Cannot run program "sh": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:183)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:173)
at jline.internal.TerminalLineSettings.stty(TerminalLineSettings.java:168)
at jline.internal.TerminalLineSettings.get(TerminalLineSettings.java:72)
at jline.internal.TerminalLineSettings.(TerminalLineSettings.java:52)
at jline.UnixTerminal.(UnixTerminal.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at jline.TerminalFactory.getFlavor(TerminalFactory.java:168)
at jline.TerminalFactory.create(TerminalFactory.java:66)
at jline.TerminalFactory.get(TerminalFactory.java:159)
at jline.console.ConsoleReader.(ConsoleReader.java:227)
at jline.console.ConsoleReader.(ConsoleReader.java:219)
at jline.console.ConsoleReader.(ConsoleReader.java:207)
at sbt.JLine$$anonfun$createReader$1.apply(LineReader.scala:100)
at sbt.JLine$$anonfun$createReader$1.apply(LineReader.scala:99)
at sbt.JLine$$anonfun$usingTerminal$1.apply(LineReader.scala:95)
at sbt.JLine$$anonfun$usingTerminal$1.apply(LineReader.scala:93)
at sbt.JLine$.withTerminal(LineReader.scala:86)
at sbt.JLine$.usingTerminal(LineReader.scala:93)
at sbt.JLine$.createReader(LineReader.scala:99)
at sbt.FullReader.(LineReader.scala:129)
at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:163)
at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:160)
at sbt.Command$$anonfun$command$1$$anonfun$apply$1.apply(Command.scala:29)
at sbt.Command$$anonfun$command$1$$anonfun$apply$1.apply(Command.scala:29)
at sbt.Command$.process(Command.scala:92)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.State$$anon$1.process(State.scala:184)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.MainLoop$.next(MainLoop.scala:98)
at sbt.MainLoop$.run(MainLoop.scala:91)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
at sbt.Using.apply(Using.scala:24)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
at sbt.MainLoop$.runLogged(MainLoop.scala:24)
at sbt.StandardMain$.runManaged(Main.scala:53)
at sbt.xMain.run(Main.scala:28)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:19)
at xsbt.boot.Boot$.runImpl(Boot.scala:44)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 58 more
[ERROR] Failed to construct terminal; falling back to unsupported
java.io.IOException: Cannot run program "sh": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:183)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:173)
at jline.internal.TerminalLineSettings.stty(TerminalLineSettings.java:168)
[info] Set current project to STT Server (in build file:/C:/Users/biowatch/Documents/Projects/STT/Web/stt-server/)
[ERROR] Failed to construct terminal; falling back to unsupported
java.io.IOException: Cannot run program "sh": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:183)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:173)
at jline.internal.TerminalLineSettings.stty(TerminalLineSettings.java:168)
at jline.internal.TerminalLineSettings.get(TerminalLineSettings.java:72)
at jline.internal.TerminalLineSettings.(TerminalLineSettings.java:52)
at jline.UnixTerminal.(UnixTerminal.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at jline.TerminalFactory.getFlavor(TerminalFactory.java:168)
at jline.TerminalFactory.create(TerminalFactory.java:66)
at jline.TerminalFactory.get(TerminalFactory.java:159)
at sbt.JLine$.sbt$JLine$$terminal(LineReader.scala:82)
at sbt.JLine$.withTerminal(LineReader.scala:85)
at sbt.JLine$.usingTerminal(LineReader.scala:93)
at sbt.JLine$.createReader(LineReader.scala:99)
at sbt.FullReader.(LineReader.scala:129)
at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:163)
at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:160)
at sbt.Command$$anonfun$command$1$$anonfun$apply$1.apply(Command.scala:29)
at sbt.Command$$anonfun$command$1$$anonfun$apply$1.apply(Command.scala:29)
at sbt.Command$.process(Command.scala:92)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.State$$anon$1.process(State.scala:184)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.MainLoop$.next(MainLoop.scala:98)
at sbt.MainLoop$.run(MainLoop.scala:91)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
at sbt.Using.apply(Using.scala:24)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
at sbt.MainLoop$.runLogged(MainLoop.scala:24)
at sbt.StandardMain$.runManaged(Main.scala:53)
at sbt.xMain.run(Main.scala:28)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:19)
at xsbt.boot.Boot$.runImpl(Boot.scala:44)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 52 more
[ERROR] Failed to construct terminal; falling back to unsupported
java.io.IOException: Cannot run program "sh": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:183)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:173)
at jline.internal.TerminalLineSettings.stty(TerminalLineSettings.java:168)
at jline.internal.TerminalLineSettings.get(TerminalLineSettings.java:72)
at jline.internal.TerminalLineSettings.(TerminalLineSettings.java:52)
at jline.UnixTerminal.(UnixTerminal.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at jline.TerminalFactory.getFlavor(TerminalFactory.java:168)
The text was updated successfully, but these errors were encountered: