Loading JDB Mysql libraries at execution

Hi =)

I'm developing a java app that needs the JDBC mysql driver. And so it figures in my code like this:

import java.sql.*;

Executing my app from eclipse, works fine.

But when executing it from Console...it seems it can't load the controller. Or it does not know where it is:

flaab@Debian ~/Desarrollo/Conexion\ $ ls /usr/share/java | grep mysql

mysql-5.0.4.jar

mysql-connector-java-5.0.4.jar

mysql-connector-java.jar

mysql.jar

How can i tell the java command to load them? The -cp arguments does not seem to work.

Thx.

[628 byte] By [flaaba] at [2007-11-27 6:08:06]
# 1

How are you executing it then? If executing as a stanalone Java application (*.java file with a Main method), then you have to add the path to the MySQL JAR to the $CLASSPATH environment variable. If executing as a JAR file, then you have to specify the path to the MySQL JAR in the Class-Path entry of the manifest.mf of the JAR.

BalusCa at 2007-7-12 17:10:02 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
=/How can I do that?export CLASSPATH=/usr/share/java hasn't worked :s
flaaba at 2007-7-12 17:10:02 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
In fact nothing does work now xDI think i've scewed up something.
flaaba at 2007-7-12 17:10:02 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...