jline 3.1.2 on java 8, ubuntu 16 does not create a terminal and does not autocomplete

1,264 views
Skip to first unread message

Pablo Alcaraz

unread,
Dec 15, 2016, 8:16:13 AM12/15/16
to jline-users
Hello

I am trying the Example.java file  of JLine3 3.1.2 on a Ubuntu 16.04 system with JNA 4.2.2 and java 8. 

I launch it with parameter "simple" and it generates an error:

WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
prompt> fo    
======>""


Autocomplete does not work. Each time I press <tab> autocomplete is not invoked.

Do I need to include some other jar file?

Pablo

Guillaume Nodet

unread,
Dec 15, 2016, 8:17:34 AM12/15/16
to jline...@googlegroups.com
Could you enable debug logging for the JUL org.jline logger and post the stack trace you'll see ?

--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pablo Alcaraz

unread,
Dec 16, 2016, 2:20:04 AM12/16/16
to jline-users
Hello

I could not make it log something relevant. I could with previous versions though. 

Anyway I could reproduce it. It seems like jline cannot create a console when it runs from an IDE or from maven.. perhaps it is because there is not generated jar but .class files? No sure though

Attached is an example project you can use.
If works ok with:

   mvn package
   java -jar target/jline-test-1.0-SNAPSHOT-jar-with-dependencies.jar simple


but it fails to create the console when it is launched from IntelliJ, or with:

   mvn exec:exec

Any help will be appreciated.

Pablo



On Thursday, December 15, 2016 at 5:17:34 AM UTC-8, gnodet wrote:
Could you enable debug logging for the JUL org.jline logger and post the stack trace you'll see ?
On Thu, Dec 15, 2016 at 1:33 PM, Pablo Alcaraz <pabl...@gmail.com> wrote:
Hello

I am trying the Example.java file  of JLine3 3.1.2 on a Ubuntu 16.04 system with JNA 4.2.2 and java 8. 

I launch it with parameter "simple" and it generates an error:

WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
prompt> fo    
======>""


Autocomplete does not work. Each time I press <tab> autocomplete is not invoked.

Do I need to include some other jar file?

Pablo

--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
jlinetest.tgz.pdf

Guillaume Nodet

unread,
Dec 16, 2016, 2:24:48 AM12/16/16
to jline...@googlegroups.com
On Thu, Dec 15, 2016 at 10:22 PM, Pablo Alcaraz <pabl...@gmail.com> wrote:
Hello

I could not make it log something relevant. I could with previous versions though. 

Anyway I could reproduce it. It seems like jline cannot create a console when it runs from an IDE or from maven.. perhaps it is because there is not generated jar but .class files? No sure though

Attached is an example project you can use.
If works ok with:

   mvn package
   java -jar target/jline-test-1.0-SNAPSHOT-jar-with-dependencies.jar simple


but it fails to create the console when it is launched from IntelliJ, or with:

   mvn exec:exec

Yeah, nothing we can do about it, that's because Intellij's console is not a real terminal. Specifically, it only sends the characters to the input stream when the user has hit the <enter> key.  That's why JLine is creating a "dumb" terminal.  It should still work, but basically, JLine can't do anything but to receive the full line when the user has hit <enter>.
 

Any help will be appreciated.

Pablo


On Thursday, December 15, 2016 at 5:17:34 AM UTC-8, gnodet wrote:
Could you enable debug logging for the JUL org.jline logger and post the stack trace you'll see ?

On Thu, Dec 15, 2016 at 1:33 PM, Pablo Alcaraz <pabl...@gmail.com> wrote:
Hello

I am trying the Example.java file  of JLine3 3.1.2 on a Ubuntu 16.04 system with JNA 4.2.2 and java 8. 

I launch it with parameter "simple" and it generates an error:

WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
prompt> fo    
======>""


Autocomplete does not work. Each time I press <tab> autocomplete is not invoked.

Do I need to include some other jar file?

Pablo

--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages