I\'m setting up a simple JDBC connection to my working MySQL database on my server. I\'m using the Connector-J provided by MySQL. According to their documentation, I\'m supp
You seem to be working on a linux box. Make sure that your terminal launches a login
shell. For example the gnome-terminal
application (probably what you are using if you are using a ubuntu or fedora box for development) has a checkbox under the profile preferences > Title and command menu called "run command as a login shell". Check that and make sure you also put this code in the ~/.bash_profile file at the end.
export CLASSPATH=/path/mysql-connector-java-5.0.8-bin.jar:$CLASSPATH
But i would argue against doing this and doing a simple launch script for your application. Something similar to this:
#!/bin/bash
Set CLASSPATH=CLASSPATH=/path/mysql-connector-java-5.0.8-bin.jar:$CLASSPATH
java -cp "$CLASSPATH"
make executable and use that to launch your application.