CocoBase uses the 'system' classpath. On windows you do this through the Control panel to permanently set the value. In unix typically this is done in one of the .* startup profiles.
On windows to 'temporarily' set the classpath simply open a command prompt and cd to the CocoBase home, set the classpath and launch CocoAdmin. This set of commands can also be captured into a startup batch script. An example using the 3.0.8 of mysql jdbc would look like
cd %COCO_HOME%\demos
set CLASSPATH=c:\mysql-connector-java-3.0.8-stable\mysql-connector-java-3.0.8-stable-bin.jar;%CLASSPATH%
cocoadmin.bat
This directory structure and jar file will vary from version to version, etc. To test and confirm if you have added the jdbc driver correctly to your classpath you can use the javap command which can be found in your <jdk_home>\bin folder. An example of this would look like:
javap org.gjt.mm.mysql.Driver
If the class is in the classpath, the system will dump its method signatures. If the classpath isn't setup correctly, you'll get a class not found error. This is a great way to debug your classpath before ever launching CocoAdmin.
Does that help?
THOUGHT Support
|