#IntelliJ and Terminal

33 messages · Page 1 of 1 (latest)

frank mango
#

Right now, when I run the program in IntelliJ, it runs it in the IDE console. I don't want that, I want the real terminal to be opened. As I am using ANSI cursor codes and the IDE doesn't support it. How can I make IntelliJ open the terminal external window?

calm solsticeBOT
#

This post has been reserved for your question.

Hey @frank mango! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 720 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

acoustic birch
#

step 1: go to edit configuration

#

Step 2: click on + icon and add new shell script

#

step 3: configure it to your needs and select apply.

#

if you are using windows and need to open cmd you can use
Start-Process cmd.exe -ArgumentList "/k (your command) in script text.

#

and if its default maven project just add Start-Process cmd.exe -ArgumentList "/k mvn clean install -Dskip to your script text.

#

NOTE:
This command will be executed in IntelliJ terminal and the command will open cmd to run you script.

frank mango
acoustic birch
#

are you using maven, gradel or default java?

frank mango
#

Gradle

acoustic birch
# frank mango Gradle

i haven't use gradel so i am not 100% sure buti think this should work
Start-Process cmd.exe -ArgumentList "/k gradel run"

frank mango
#

Why is IntelliJ taking way too long

#

Is it the Build Process?

acoustic birch
#

when you use intellij it compiles all you classes

#

using Java MainClass will NOT compile your class

frank mango
acoustic birch
frank mango
#

java path/to/MainClass.java

frank mango
acoustic birch
#

like the whole project directory.

frank mango
#

Okay wait

#

It's not a production project, just a project that I do fun projects on like AI projects, algorithm visualizers, etc. so I will just show you the class that I want to run in the terminal

acoustic birch
#

if java path/to/MainClass.java works for you its okay but to be sure this will not compile your code it will run your already compiled code.

#

and i am also not sure if you can use java with a .java file

frank mango
#

It ran with the changes when I did java MainClass.java

#

Tho I want gradle to run for the dependencies

acoustic birch
frank mango
#

It keeps saying Build Failed

acoustic birch
#

so maybe there is problem with your gradel/project