jbang-idea icon indicating copy to clipboard operation
jbang-idea copied to clipboard

Unable to create a JBang script from Intellij

Open maciejwalkowiak opened this issue 2 years ago • 3 comments

  1. Created a new empty project in Intellij IDEA.
  2. Selected the SDK for project: image
  3. Trying to create a new JBang script: image
  4. Getting following message: image

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)

maciejwalkowiak avatar Nov 18 '22 09:11 maciejwalkowiak

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()

linux-china avatar Nov 25 '22 00:11 linux-china

@maxandersen I think JBang will download Java runtime automatically even no local JDK detected . I'm right?

linux-china avatar Nov 25 '22 10:11 linux-china

Yes @linux-china

maxandersen avatar Dec 26 '22 12:12 maxandersen