Jchem and Mysql => error class java not found

User 26c54ae8b9

29-02-2008 14:58:08

Dear Chemaxon,





I would like to create a chemical database with jchemanager, but i can't connect to mysql database.





I have downloaded Java driver for mysql (mysql-connector-java-5.0.8-bin.jar and other files) but i have a error message (see attached file).


I don't know how to initialise the variable CLASSPATH... it's really necessary ?


I copy the .jar file in /lib/ext of the JAVA directory, but no result.


I use the chemaxon manager guide (http://www.chemaxon.com/jchem/doc/admin/index.html#install) but i have always the error message


I have read the forum discussion but there is no solution for my problem.





Configuration :


Windows XP PRO SP3


EasyPhp 2.0





Thanks a lot,





Karim.

ChemAxon 9c0afc9aaf

29-02-2008 15:39:20

Hi,
Quote:
I don't know how to initialise the variable CLASSPATH... it's really necessary ?
Yes it is, otherwise we would not mention it in the docs :)





Please see this page on how to set this (linked from the page you have mentioned):





http://www.chemaxon.com/jchem/doc/admin/prepscripts.html





It has a detailed description for Windows:
Quote:
Under Windows these variables can be set from the Control Panel. For example in the case of Windows XP:


Start menu -> Control panel -> System-> Advanced -> Environment variables


After changing the environment variables a new console (Command Prompt) should be opened so the changes can take effect.





To check the current setting of an environment variables, type "set" in the console. To print a specific variable type "echo %VARIABLE_NAME%".



You should have the full path to the .jar file in the CLASSPATH, e.g.:
Quote:
C:\somewhere\on\the\hard\drive\mysql-connector-java-5.0.8-bin.jar
In the future we plan to ease this thing, so the user will only have to copy the driver file into a dedicated directory.





Best regards,





Szilard

User 26c54ae8b9

01-03-2008 17:20:55

Thanks for your response Szilard, but it doesn't work, I have the same error message.





Here is what i have done (under windows XP) :





set CLASSPATH=c:\mysql-connector-java-5.0.8-bin.jar


echo %CLASSPATH%


c:\mysql-connector-java-5.0.8-bin.jar








Thanks a lot !


Karim.

ChemAxon 9c0afc9aaf

02-03-2008 10:40:10

Hi Karim,





Setting the CLASSPATH in a console will only affect that console (and the command-line applications started from there) until you close it.





I suggest you to follow the instructions quoted above instead.





Thank you,





Szilard

ChemAxon 9c0afc9aaf

02-03-2008 10:43:24

PS:





I just see you have probably misunderstood this line:
Quote:



To check the current setting of an environment variables, type "set" in the console.
This simply informs you that you can print the env. variables by typing "set".


Please adjust the settings in the Control Panel as described.





Szilard

User 26c54ae8b9

02-03-2008 13:07:27

Hello Szilard,





It works now !! :=))





This post can be closed.





Thanks a lot !





Karim.