In my ~/.bashrc I export my java CLASSPATH the following way:
CLASSPATH=$CLASSPATH:/home/user/java/libs/apache-ant-1.9.0/lib/*:/home/user/java/MyProject/libs/*
The folder "/home/user/java/MyProject/libs/" contains the following jars:
colt.jar mysql-connector-java-5.1.22-bin.jar
concurrent.jar postgresql-8.4-703.jdbc4.jar
When I try to compile a class of my project that imports parts the colt.jar, I get an error message:
/src$ javac visualization/VisualizeCorrelationMatrix.java
visualization/VisualizeCorrelationMatrix.java:16: cannot access cern.colt.matrix.impl.SparseDoubleMatrix2D
class file for cern.colt.matrix.impl.SparseDoubleMatrix2D not found
int N = cm.columns();
^
But when compling it the followin way it works without errors:
/src$ javac -cp ".:/home/user/java/MyProject/libs/*" visualization/VisualizeCorrelationMatrix.java
I checked that the paths in the CLASSPATH variable and the manuel optino -cp are 100% identical. Also an echo $CLASSPATH returns the correct path.
Why do I still get this error?