-- Cygwin Utilities
If you are trying to run a Java Class using a Shell Script running off Cygwin, you are sure to see a ClassNotFoundException.
The problem is due to these :-
Please be sure not to check this into a Production environment - cygpath is only available as part of the Cygwin Utilities.
The problem is due to these :-
- java.exe is a Windows executable program
- java.exe expects its paths & classpaths to be in the Windows Format - paths separated by semi-colon ( ; )
- Cygwin wants its paths in the LINUX Format - paths separated by a colon ( : )
CLASSPATH=.:../lib/junit.jar:../lib/weblogic.jar:../lib/ojdbc6.jar
# Convert paths to help cygwin see Classpaths
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
java -classpath "$CLASSPATH" com.test.PreLoadTester
Please be sure not to check this into a Production environment - cygpath is only available as part of the Cygwin Utilities.