Scripts like karaf.bat have a problem resolving the java jdk under windows, when the variables are setup this way:
JAVA_HOME = F:\Java\jdk
JAVA = %JAVA_HOME%\bin
Path = various stuff; %JAVA%
results in the correct output of: F:\Java\jdk\bin
If the JAVA variable is deleted and the Path is set to %JAVA_HOME%\bin it does work, although the resulting path is the same.