Craig Ringer, 03.03.2010 04:20:
>> I set it to the jar file as written above
>
> No, you didn't. You set it to the folder CONTAINING the jar. Try:
>
> CLASSPATH=$CLASSPATH:/opt/PostgreSQL/pgJDBC/postgresql-8.4-701.jdbc.jar
>
>> I am using netbeans 6.8 ... The project I chose was a java application . The application is supposed to connect to a
databasewhich parameters (DB name , userName,Password ) I pass through netbeans config file option (under the "run"
sectionin the menu. I also tried to run it manually with this line:
>
> Eh? If you're using NetBeans, why are you messing with the CLASSPATH
> environment variable?
Actually nowadays one should never use a system wide CLASSPATH, because it simply leads to a lot of problems.
Either the IDE manages that or the classpath is defined using the -cp parameter when starting the Java program. Or -
mostuser-friendly - create an executable jar file that defines all needed libraries.
Thomas