Visitar URL original
JLine creates dumb terminal since 3.19 and autocompletion doesn't work · Issue #856 · jline/jline3 · GitHub
Skip to content

JLine creates dumb terminal since 3.19 and autocompletion doesn't work #856

Closed

Description

@turbanoff

Recently I've upgraded jline dependency to v.3.23 in my project and noticed that autocompletion doesn't work anymore.
Got warning from jLine:

WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

I've tracked down issue to this #PR - #616
For some reason jLine don't consider output stream as a system stream and fallbacks to dumb terminal

Output from org.jline.terminal.impl.Diag:

java.lang.NoClassDefFoundError: com/sun/jna/Platform
        at org.jline.terminal.impl.jna.JnaNativePty.current(JnaNativePty.java:41)
        at org.jline.terminal.impl.jna.JnaTerminalProvider.current(JnaTerminalProvider.java:33)
        at org.jline.terminal.impl.jna.JnaTerminalProvider.posixSysTerminal(JnaTerminalProvider.java:84)
        at org.jline.terminal.impl.jna.JnaTerminalProvider.sysTerminal(JnaTerminalProvider.java:55)
        at org.jline.terminal.impl.Diag.testProvider(Diag.java:99)
        at org.jline.terminal.impl.Diag.diag(Diag.java:57)
        at org.jline.terminal.TerminalBuilder.doBuild(TerminalBuilder.java:557)
        at org.jline.terminal.TerminalBuilder.build(TerminalBuilder.java:314)
        at org.jline.terminal.TerminalBuilder.terminal(TerminalBuilder.java:106)
        at com.CoreLauncher.main(CoreLauncher.java:62)
Caused by: java.lang.ClassNotFoundException: com.sun.jna.Platform
        ... 24 more
System properties
=================
os.name =         Linux
OSTYPE =          null
MSYSTEM =         null
PWD =             /opt/ctdev
ConEmuPID =       null
WSL_DISTRO_NAME = null
WSL_INTEROP =     null

OSUtils
=================
IS_WINDOWS = false
IS_CYGWIN =  false
IS_MSYSTEM = false
IS_WSL =     false
IS_WSL1 =    false
IS_WSL2 =    false
IS_CONEMU =  false
IS_OSX =     false

JnaSupport
=================
StdIn stream =    false
StdOut stream =   false
StdErr stream =   false
Unable to check stream names: java.lang.NoClassDefFoundError: com/sun/jna/Platform
Unable to open terminal: java.lang.NoClassDefFoundError: com/sun/jna/Platform

JansiSupport
=================
StdIn stream =    true
StdOut stream =   false
StdErr stream =   false
StdIn stream name =     /dev/pts/1
StdOut stream name =    null
StdErr stream name =    null
Terminal size: Size[cols=200, rows=34]
The terminal seems to work: terminal org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.linux.LinuxNativePty

Exec Support
=================
StdIn stream =    true
StdOut stream =   false
StdErr stream =   false
StdIn stream name =     /dev/pts/1
StdOut stream name =    null
StdErr stream name =    null
Terminal size: Size[cols=200, rows=34]

Application is executed via python/bash scripts. Output is also copied to file via tee command

  |   |                           `-python3 /opt/ctdev/system/libexec/dx_module.py -c run -d console
  |   |                               `-bash /opt/ctdev/system/libexec/start_app console
  |   |                                   |-bash /opt/ctdev/log/console.start.cmd
  |   |                                   |   `-java bla-bla-bla
  |   |                                   |       `-88*[{java}]
  |   |                                   `-tee -a /opt/ctdev/log/console.out

Is it possible somehow disable this check? Autocompletion worked just fine with 3.18, even output was redirected.

Activity

  1. added this to the 3.24.0 milestone on Oct 24, 2023
  2. added a commit that references this issue on Oct 25, 2023
    461976f
  3. added a commit that references this issue on Mar 7, 2024
    d4bf37c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions