Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I am trying to connect to mysql on my jsp page using Eclipse.
I have declared my driver as:
Class.forName("com.mysql.jdbc.Driver").newInstance();


and I get an error on runtime: "java.lang.ClassNotFoundException:com.mysql.jdbc.Driver"

Can you help please

Thanks in advance.
Posted
Updated 16-May-11 4:23am
v2

1 solution

The reason is that jar is either not installed or not in the runtime path for the running process.
If you are running it on a client machine within a web-browser then it may well be sand-boxed to prevent 'bad things' [tm]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900