Java Mysql connection without Class.forName
up vote
-1
down vote
favorite
I've been trying to connect to a mysql database from java without loading the driver previously with Class.forName (...). With the first i cant connect (No suitable driver found), while with others i can
- dont work: com.mysql.jdbc_5.1.5.jar
- work: mysql-connector-java-5.1.6-bin.jar
After seeing the name of the file and seeing that one starts the "com" I would like to know how each one of the drivers works, and because 5.1.5 forces me to load the driver previously and the other does not, thanks
java mysql
add a comment |
up vote
-1
down vote
favorite
I've been trying to connect to a mysql database from java without loading the driver previously with Class.forName (...). With the first i cant connect (No suitable driver found), while with others i can
- dont work: com.mysql.jdbc_5.1.5.jar
- work: mysql-connector-java-5.1.6-bin.jar
After seeing the name of the file and seeing that one starts the "com" I would like to know how each one of the drivers works, and because 5.1.5 forces me to load the driver previously and the other does not, thanks
java mysql
1
It's not clear what you're asking and what your issue is. "...how each one of the controllers works", what is controllers here and what is it you want to know about them. Maybe post some example code of when it isn't working.
– Joakim Danielson
Nov 11 at 14:28
I was referring to the drivers, the first one does not allow me to connect to the database without using Class.forName, I think it is understood without the need to publish code
– Rafael Valls
Nov 11 at 15:21
Post text not images please.
– Joakim Danielson
Nov 11 at 17:21
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I've been trying to connect to a mysql database from java without loading the driver previously with Class.forName (...). With the first i cant connect (No suitable driver found), while with others i can
- dont work: com.mysql.jdbc_5.1.5.jar
- work: mysql-connector-java-5.1.6-bin.jar
After seeing the name of the file and seeing that one starts the "com" I would like to know how each one of the drivers works, and because 5.1.5 forces me to load the driver previously and the other does not, thanks
java mysql
I've been trying to connect to a mysql database from java without loading the driver previously with Class.forName (...). With the first i cant connect (No suitable driver found), while with others i can
- dont work: com.mysql.jdbc_5.1.5.jar
- work: mysql-connector-java-5.1.6-bin.jar
After seeing the name of the file and seeing that one starts the "com" I would like to know how each one of the drivers works, and because 5.1.5 forces me to load the driver previously and the other does not, thanks
java mysql
java mysql
edited Nov 11 at 17:39
asked Nov 11 at 13:37
Rafael Valls
1063
1063
1
It's not clear what you're asking and what your issue is. "...how each one of the controllers works", what is controllers here and what is it you want to know about them. Maybe post some example code of when it isn't working.
– Joakim Danielson
Nov 11 at 14:28
I was referring to the drivers, the first one does not allow me to connect to the database without using Class.forName, I think it is understood without the need to publish code
– Rafael Valls
Nov 11 at 15:21
Post text not images please.
– Joakim Danielson
Nov 11 at 17:21
add a comment |
1
It's not clear what you're asking and what your issue is. "...how each one of the controllers works", what is controllers here and what is it you want to know about them. Maybe post some example code of when it isn't working.
– Joakim Danielson
Nov 11 at 14:28
I was referring to the drivers, the first one does not allow me to connect to the database without using Class.forName, I think it is understood without the need to publish code
– Rafael Valls
Nov 11 at 15:21
Post text not images please.
– Joakim Danielson
Nov 11 at 17:21
1
1
It's not clear what you're asking and what your issue is. "...how each one of the controllers works", what is controllers here and what is it you want to know about them. Maybe post some example code of when it isn't working.
– Joakim Danielson
Nov 11 at 14:28
It's not clear what you're asking and what your issue is. "...how each one of the controllers works", what is controllers here and what is it you want to know about them. Maybe post some example code of when it isn't working.
– Joakim Danielson
Nov 11 at 14:28
I was referring to the drivers, the first one does not allow me to connect to the database without using Class.forName, I think it is understood without the need to publish code
– Rafael Valls
Nov 11 at 15:21
I was referring to the drivers, the first one does not allow me to connect to the database without using Class.forName, I think it is understood without the need to publish code
– Rafael Valls
Nov 11 at 15:21
Post text not images please.
– Joakim Danielson
Nov 11 at 17:21
Post text not images please.
– Joakim Danielson
Nov 11 at 17:21
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53249293%2fjava-mysql-connection-without-class-forname%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
It's not clear what you're asking and what your issue is. "...how each one of the controllers works", what is controllers here and what is it you want to know about them. Maybe post some example code of when it isn't working.
– Joakim Danielson
Nov 11 at 14:28
I was referring to the drivers, the first one does not allow me to connect to the database without using Class.forName, I think it is understood without the need to publish code
– Rafael Valls
Nov 11 at 15:21
Post text not images please.
– Joakim Danielson
Nov 11 at 17:21