Mysql jdbc driver windows

broken image

But with this specific jar for this mysql test it is not. In my other learning / tests (with my self generated jar files) a relevant class is being pulled from the jar as it should. Cool!īut, if I remove the actual folders and depend upon the jar itself, that is when I get the ClassNotFoundException. Now, if I unzip the connector jar so the folders are present in my test folder: com\mysql\jdbc\Driver.class (as well as all the other files that were in the jar), my test class works fine and records are being inserted into my db table. The issue is with this statement: Class.forName('') - I am getting Exception in thread 'main' :. I am now up to the point of testing how to interact with the mySql database using the same java connector that CF is using (mysql-connector-java-commercial-5.1.25-bin.jar in this case, as used on my localhost dev machine).įor the sake of simplicity for the test, both my test class and the connector jar are in the same folder (Windows machine). I can get all that to work for the classes I have written so far. I have a legacy ColdFusion 10 application and I am wanting to incrementally use Java classes instead of ColdFusion CFCs as a way to migrate out of CF land.

broken image
broken image

I am very new to java and on a steep learning curve.

broken image