Search code examples
javawindowsnetbeansenvironment-variablesconfiguration-files

Windows/NetBeans platform - Getting JAVA_HOME environment variable into conf file


I'm trying to use the JAVA_HOME windows environment variable as the jdkhome directory in a netbeans platform application. The variable is definitely set (it was originally a user variable, but I added an environment variable as well because I thought that might be the issue). My config file currently contains the line

jdkhome="${JAVA_HOME}"

I tried

jdkhome=${JAVA_HOME}

as well. Neither of these work - it says there is no valid java install. It does work if I manually write out the directory that JAVA_HOME points to.

I've tried asking on the official netbeans forum, but there hasn't been any response.

Any advice?


Solution

  • Try %JAVA_HOME% and see if that works.