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
Ability to silence fallback message #93
Comments
NoClassDefFoundError sounds like a classpath issue, as this class should exist. W/o this class (and its friends) then the terminal will lack most features that make jline interesting for users. |
Its failing to initialize on platforms without the correct Visual C++ Runtimes (as far as I can tell - the classes are there). |
what version are you using? and what version were you using before which you said did not produce the ERROR logging? |
2.6 does not produce logging, 2.11 does :p |
Hmmm must be mistaken, that message has been there for a long time :| |
There is no easy way to omit this single error from being displayed. The creation of the Terminal instances is failing in non-expected manner, and the log providing that failure detail. You can change the log stream used by jline2 by calling jline.internal.Log.setOutput(PrintStream). Note this is internal api and could be changed at any time (though probably won't be any time soon). There are 2 other alternatives, one would be to add support to disable all logging (I do not recommend this) or change to a more robust logging system which includes details like logger names which would allow specific loggers to be shunted... though I'm no fan of JUL and thus such a change would add another dependency (like to slf4j and then require a slf4j provider) and for these reasons the logging has been left in the simple form that it is in now. Perhaps Hiram has some insight on if jansi can produce a windows binary w/o additional dependencies and generally avoid this problem all together. |
Log.setOutput( new PrintStream( ByteStreams.nullOutputStream() ) ); |
@md-5 what version of windows did the failure to locate visual c++ dll occur on? BTW I'm no windows developer, but for clarity can you confirm that it was msvcrt.dll that was having problem being resolved? |
Sorry for jumping in an unrelated issue, but I was trying to disable logging myself for a different bug. This call to For more information, my use case is to disable the stack trace shown (not the error message itself, just the stack trace) when user enters a bad expansion, like |
[ERROR] Terminal initialization failed; falling back to unsupported java.lang.NoClassDefFoundError: Could not initialize class org.fusesource.jansi.internal.Kernel32 at org.fusesource.jansi.internal.WindowsSupport.getConsoleMode(WindowsSupport.java:50) at jline.WindowsTerminal.getConsoleMode(WindowsTerminal.java:177) at jline.WindowsTerminal.init(WindowsTerminal.java:80) at jline.TerminalFactory.create(TerminalFactory.java:101) 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 net.md_5.bungee.BungeeCord.(BungeeCord.java:157) at net.md_5.bungee.BungeeCord.main(BungeeCord.java:189)
Older JLine versions didn't display it, and I really don't want to either - users think something is wrong.
The text was updated successfully, but these errors were encountered: