Help, how to dynamicly load java class

Hi, everyone:
I'm trying to connect to DB using JDBC on fedora. I have successfully installed jdk and it's ok to run common java program.

The environment variables:

JAVA_HOME=/installed/mycoy/jdk1.6.0
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/ojdbc6.jar
export JAVA_HOME PATH CLASSPATH

And I put the driver on the dir specified.

But the driver still cannot be found by the connection code.
I have also tried to export the jar directly in shell. But it doesn't work either.

I'm wondering how to configure the class-librarys on linux.
Could anyone help me? Thanks.

You may want to put in the error you have.

Are you sure you may just need to make something executable?

To nj78:
The code has exception-handler, and I'm sure the driver cannot be found. The JDBC driver is jar.
The connection-code is package to jar and executable.

Maybe it's a config issue with the DB you are using?

See this link:

Question about connection java and Postgresql in Linux - bytes