• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

mysql Connector/J prerequisites

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you specify what are the Exceptions you get...and how are you trying to install the Driver
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Sorry for late reply.
Thanks a Lot for the replies




Thanks in Advance
KAshwini



 
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic