Friday, October 13, 2006

How to add MySQL driver to GWT

  1. Download MySQL Connector/J from Mysql.com
  2. Find GWT Directory from "YourProject-shell.cmd" file in your project directory, open it by text editor and find sometimg look like this "C:/MyDirectory/gwt-windows-x.x.x/gwt-user.jar" -- x.x.x is WebToolkit version number. Your GWT Directory is "C:/MyDirectory/gwt-windows-x.x.x/"
  3. Decompress MySQL Connector/J archive file and copy "mysql-connector-java-x.x.x-bin.jar" to GWT Directory (from step 2).
  4. Open eclipse, Run menu -> Run... -> Java Application -> your project name -> Classpath -> click at User Entries.
  5. Click Add External JARs on the right and open your "mysql-connector-java-x.x.x-bin.jar" at GWT Directory.
  6. Apply and ROCK THE WORLD!
credit from Solution for the "ClassNotFoundException" when trying to connect to MySql database

No comments: