jbang-idea
jbang-idea copied to clipboard
Unable to create a JBang script from Intellij
- Created a new empty project in Intellij IDEA.
- Selected the SDK for project:

- Trying to create a new JBang script:

- Getting following message:

IntelliJ IDEA 2022.1.4 (Ultimate Edition) Build #IU-221.6008.13, built on July 19, 2022
Local Java version (probably irrelevant):
➜ ~ java --version
openjdk 17.0.4.1 2022-08-12
OpenJDK Runtime Environment Temurin-17.0.4.1+1 (build 17.0.4.1+1)
OpenJDK 64-Bit Server VM Temurin-17.0.4.1+1 (build 17.0.4.1+1, mixed mode, sharing)
I should add project's Java SDK as JAVA_HOME to run jbang command.
ProcessExecutor().command(jbangCmd, "template", "list")
.environment("NO_COLOR", "true")
.readOutput(true)
.execute()
.outputUTF8()
.lines()
@maxandersen I think JBang will download Java runtime automatically even no local JDK detected . I'm right?
Yes @linux-china