Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions


Posted on 2002-06-04
Last Modified: 2010-03-31
I have downloaded mm.mysql 2.0.14 drivers.
I tried serveral ways to make it work; however
I can't.

Actually, my problem is i don't know where
i have to set for CLASSPATH.

I also tried for the second way, putting jar file
into jre/lib/ext, but i think it might have
some change in 'String driverName = "org.gjt.mm.mysql.Driver"' but i don't know what it
have to be !!!!

Are there any document about this ?? thank you
Question by:mrvithan
  • 4
  • 3
LVL 19

Accepted Solution

cheekycj earned 50 total points
ID: 7053980
code to access the driver:
Connection conn = DriverManager.getConnection("jdbc:mysql://SERVER1:3306/DB", "UN", "PW");

to set the classpath in windows:
C:\> set CLASSPATH=\path\to\mm.mysql.jdbc-[version];%CLASSPATH%
to set the classpath in unix:
$ setenv CLASSPATH /path/to/mm.mysql.jdbc-[version]:$CLASSPATH


Author Comment

ID: 7054012
Well...i think i found the problem...
I went to DOS mode to set the CLASSPATH.
then i exit which means - I thought - the CLASSPATH
is also deleted...

So what i have to do ???
LVL 19

Expert Comment

ID: 7054052
yes.. you would have to set the classpath for each dos window.

Or you can set it as an environment variable:
In WinNT/Win2k:
  Under Computer/System Properties-> Environment Variables.. add your classpath.
In Win9x:
   Add it to autoexec.bat.

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Author Comment

ID: 7054073
Well, let's me try tomorrow.. today i so tried
LVL 19

Expert Comment

ID: 7054330
ok.. post an update when you try it out.


Author Comment

ID: 7055572
I put the unjar all files at c:\mm.mysql,
then i set the CLASSPATH=c:\mm.mysql.

   String driverName = "org.gjt.mm.mysql.Driver";

it still doesn't work... what i did wrong ????


Expert Comment

ID: 7055592
Here is a silly question, but have to make sure, did you un-jar the jar file that you downloaded?  Make sure that you have extracted the proper jar from within the original jar, then you could place it into the lib/ext directory.  I've done that on a W98 and W2000 machine without any problems, never needed to set the path.  Ok, I see that you did un-jar the files, then copy the bin jar named: mm.mysql-2.0.14-bin.jar and place it into the lib/ext directory.  

Author Comment

ID: 7055648
Well, it works right now....

I will give the point to cheekycj; sorry to tombshell...

Thank you

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
print map entry 34 72
Groovy problem when using SOAPUI : DispatchException occurred 7 58
jboss wildfly 10.1 10 227
American Express @Work site and Java 4 20
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question