Where Are The Wise Men?

Mike's Ramblings

Getting Cygwin and Java to Play Together

| Comments

I hate it when Open Source projects can't handle the fact that I run everything in Cygwin. Yes, I still want to use your run.sh file and have it understand my Java interpreter. Yes, classpath and everything! It's not hard people!

Luckily, I keep this script handy, which I stole from ANT years ago:

[bash]
case "`uname`" in
CYGWIN*) cygwin=true ;;

esac

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then JAVA\_HOME=\`cygpath --windows "$JAVA_HOME"`
CLASSPATH=`cygpath --windows --path "$CLASSPATH"`
fi
[/bash]