JAVA_HOME on win 2008 server points to different places from different calles
-
25-06-2021 - |
Question
my problem is with JAVA_HOME variable. When i echo it inside cmd, it points to jdk as it should, when i echo it from powershell, it points to jre7 and when i echo it with php script from web it points jre6. I have tried to set it with set JAVA_HOME and set-variable JAVA_HOME from both the powershell and php script which i called from web and neither did work. Does anybody have some idea how could i fix this? thanks
Solution 2
I didn't actually solve the problem, I just cured the symptoms. I have edited the ant.bat. Just added the line: set JAVA_HOME=path\to\jdk at the start of the file
OTHER TIPS
is it possible JAVA_HOME is defined as a user variable and not a system variable and those processes are running as different users ?