Sorry if thread is in wrong area ..
I just had a doubt , if this is not area to ask , i would apologise for that , and kindly remove this thread
I had written a simple prgrm in java connecting with mysql i had downloaded the mysqlconnector for java , latest version frm mysql.com I'm not able to get the output of program , just shows driver not loaded Can anyone suggest how to overcome this .. please |
Hi -
I cut/pasted everything but the package from this link: http://www.stardeveloper.com/article...3090401&page=1 Code:
import java.sql.Connection; |
Here is the ouput
Exception: com.mysql.jdbc.Driver
This is what i get as output |
Hi -
Sorry - a) the example's error checking wasn't quite clear enough. The new version below should work better. b) you usually explicitly specify your JDBC .jar file in your "classpath" argument. c) you definitely need to make sure you can access mysql itself (e.g. from the command line). Here is a revised example. I tried it under SusE Linux with Sun Java and MySQL. It worked for me; I hope it works for you, too. Code:
/* 'Hope that helps .. PSM |
OK ..
1) export CLASSPATH=$CLASSPATH:/home/vibin/Desktop/mysql-connector-java-5.1.7.tar.gz
2) my MySql is working fine I believe the classpath settings is performing some strange actions, do my settings is correct as u think ? |
Hi -
Quote:
Extract it, and use the .jar file. Then you should be golden :-) Your .. PSM |
A bigggggggg thanks dude .. U saved me ... I need to start a project , evrything ok , but just to connect with database left , my design over , need to code it
Again thanks maaan |
All times are GMT -5. The time now is 03:23 AM. |