Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
12.0
-
MacOS X 10.15.6, Apache NetBeans IDE 12.0, Gradle plugin 1.4
Description
On a new empty "Java with Gradle" project, when running with `run`:
public static void main(String[] args) { System.out.println("ENV1: " + System.getenv("JAVA_HOME")); System.out.println("ENV2: " + System.getenv("_")); }
the result in the Output window is:
JAVA_HOME="/Users/$user/Downloads/jdk-11.0.2.jdk/Contents/Home" cd /Users/$user/NetBeansProjects/gradleproject; ./gradlew --configure-on-demand -x check run Configuration on demand is an incubating feature. > Task :compileJava > Task :processResources NO-SOURCE > Task :classes > Task :run ENV1: null ENV2: /Users/$user/Downloads/jdk-11.0.2.jdk/Contents/Home/bin/java
So internally JAVA_HOME is set for NetBeans, but the project doesn't have access to it.
This might be a bug, as there is an environment variable named `_` that has the value expected for `JAVA_HOME`.
On a Maven project, `JAVA_HOME` is printed with the correct value, but `_` doesn't exist (as expected). This result is the also the expected for both Maven and Gradle projects on Windows.
Attachments
Issue Links
- links to
- mentioned in
-
Page Loading...