sunmingtao / sample-code

3 stars 4 forks source link

How to set JAVA_HOME in windows environment in a bash script? #127

Closed sunmingtao closed 4 years ago

sunmingtao commented 4 years ago

This is to solve the issue of switching between different versions of JDK in a cygwin/windows environment.

TMP=`cygpath -sw "C:\Program Files\Java\jdk1.8.0_241"`
export JAVA_HOME=`cygpath -u $TMP`