jbangdev / jbang-idea

IntelliJ IDEA plugin for JBang
https://plugins.jetbrains.com/plugin/18257-jbang
MIT License
20 stars 9 forks source link

Unable to create a JBang script from Intellij #74

Open maciejwalkowiak opened 1 year ago

maciejwalkowiak commented 1 year ago
  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)
linux-china commented 1 year ago

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 commented 1 year ago

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

maxandersen commented 1 year ago

Yes @linux-china