Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mysql Connector/J prerequisites

 
kashwini Kulkarni
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,


I am trying to install and use mysql Connector/J but am getting some exceptions.
Can anyone tell me what are the prerequisites for installing mysql Connector/J ?


Thanks in Advance
KAshwini


 
Arpit Panwar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you specify what are the Exceptions you get...and how are you trying to install the Driver
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Installation is simple: download the zip or tar.gz file and unpack it somewhere. That is it.

Prerequisites: you need to have a JVM and you must have access to a MySQL database.

To use it, make sure the mysql-connector-java-3.1.14-bin.jar file is in your classpath.
If you are running a standalone client (Java SE app), see the docs for the API calls you need to make to establish a connection.
If you are running a web app or other Java EE app, see the app server or web container documentation for how to set up and access a data source.
 
kashwini Kulkarni
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Thanks a lot for replying.

Actaully i searched the net for the installation process and got the following steps on some site ,i just followed those.

1. Extract the folder. You can put it anywhere,it does not matter.
2. Copy file 'mysql-connector-java-3.1.12-bin.jar' from the extracted folder into jdk1.5\jre\lib\ext folder.
3. Copy file 'aspectjrt.jar' from \src\lib into jdkxxx/jre/lib/ext folder.

4. Go to control Panel->Advance->Environment Variable->System Variable.
5. The next step depends on your system variable:

IF YOU HAVE CLASSPATH:
6. Click once at Classpath and then click edit.
7. At the end of the Variable Value, simply put ';C:\jdk1.5\jre\lib\ext\mysql-connector-java-3.1.12-bin.jar'.(Without the ')
8. Click OK.

I am getting following exception

CommunicationsException: Communications link failure.

Actaully I am all confused as to what could be the best and feasible backend for swing?


Thanking You
KAshwini

 
Jan Cumps
Bartender
Posts: 2602
13
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2. Copy file 'mysql-connector-java-3.1.12-bin.jar' from the extracted folder into jdk1.5\jre\lib\ext folder.
3. Copy file 'aspectjrt.jar' from \src\lib into jdkxxx/jre/lib/ext folder.
That is not very good advise.
Better follow the steps from MySql team.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IF YOU HAVE CLASSPATH:
6. Click once at Classpath and then click edit.
7. At the end of the Variable Value, simply put ';C:\jdk1.5\jre\lib\ext\mysql-connector-java-3.1.12-bin.jar'.(Without the ')
8. Click OK.

This is also bad advice. You should never set CLASSPATH in either the User Variables or the System Variables. I used to set CLASSPATH when I first started using Java and ran into numerous issues - I haven't had CLASSPATH set for over 10 years now. Instead, define CLASSPATH local to a bat file or sh script, or just pass it using -classpath on the command line.
 
kashwini Kulkarni
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Sorry for late reply.
Thanks a Lot for the replies




Thanks in Advance
KAshwini



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic