0

What is the intended mechanism for running JDK tools from inside intellij idea ? As of now I see two options:

  1. Using Gradle and configuring your Gradle build with correct plugins and configurations needed, then running the appropriate task.
  2. Using the built in terminal, however I believe this is just a dumb terminal and doesn't respect your current project JDK so you would have to use absolute file names to make sure you are running from correct JDK and provides no benefits from just opening up a terminal emulator outside of idea.

If you don't know what I am referring to by JDK tools, here is a list: https://docs.oracle.com/en/java/javase/17/docs/specs/man/index.html

3
  • 2
    It depends on the tool. javac and jar you would be running via gradle/maven, jstack you would run from a terminal. What are you trying to do? Commented Nov 19, 2021 at 0:44
  • If that's the options that's fine, I just wanted to make sure I wasn't missing something. Commented Nov 19, 2021 at 0:53
  • @user1086516 you can change from default terminal to git bash terminal. But still it will use default JDK version in the system environment Commented Nov 19, 2021 at 4:24

1 Answer 1

1

There is feature request for IntelliJ IDEA about that: https://youtrack.jetbrains.com/issue/IDEA-255370 Please vote and follow for updates.

For the time being, you can set "JAVA_HOME" env. variable for the terminal under Preferences | Tools | Terminal to match your project's SDK:

IntelliJ IDEA terminal settings

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.