Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug Jline2 application via Eclipse

I am using Jline2 framework to build a console application in Java. When launching the application from Eclipse on Windows 7, the shell exists immediately and does not wait for the user to input commands.

Any idea on what might be wrong?

like image 341
sangupta Avatar asked Jun 06 '12 17:06

sangupta


1 Answers

Finally found a small trick to make it work. Add the following VM option to the execution parameters (Run Config/Debug Config)

-Djline.terminal=jline.UnsupportedTerminal

This will make the code run inside Eclipse. However, some strange characters may be written to the console during the course of the run.

Hope this helps.

like image 89
sangupta Avatar answered Sep 21 '22 06:09

sangupta