Hello. Is there any way to make IntelliJ run a Kotlin program in a terminal, rather than the run panel? The run panel does not interpret ANSI escape sequences, but my app needs to clear the screen and lay out text in the terminal.
c
Casey Brooks
04/04/2024, 1:40 AM
If I'm remembering correctly, I think it's actually Gradle that doesn't handle the ANSI sequences properly. Perhaps try building a fat jar and running
java -jar
on it instead of running through Gradle
n
natpryce
04/04/2024, 7:56 AM
In my case I am not running the app with Gradle. I am using the Kotlin run configuration type, and have tried running the app via both the Services and Run panels. As far as I can tell, in both cases the UI control that displays the output ignores ANSI escape sequences.
natpryce
04/04/2024, 7:57 AM
How is one meant to run apps with a terminal UI via IntelliJ’s run button?
k
Klitos Kyriacou
04/04/2024, 9:50 AM
Hi Nat, I couldn't reproduce your issue. For me, it's working. And it's a Gradle app.
n
natpryce
04/04/2024, 2:09 PM
Hmmm… maybe only clearing the terminal is the issue