• 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

stange problem with MySql driver

 
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I recently installed a driver for connecting to MySql . The driver comprised of just one dll that is the odbc3.dll . i regestered that dll in my system but still could not connect . I then downloaded the corresponding jar file(mm.mysql-2.0.4-bin.jar.zip) and included in my class path ... it worked .
Now the thing is that i need to make an setup.exe for my application through which i also install the drivers dll in the users system . But since th dll didn't work , i probably have to install the jar file but for that i also need to edit the autoexec.bat file of the user . How do i do that ?
why didn't the dll work ???
PLease help me out
Thanks a ton in advance
[ May 08, 2003: Message edited by: raghav mathur ]
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any inputs ... please help .
Thanks
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you need to edit the autoexec.bat file? Are you trying to adjust the system classpath setting?
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dirk Schreckmann:
Why do you need to edit the autoexec.bat file? Are you trying to adjust the system classpath setting?


Yes i,am . What could be the other alternative ?
What i actually want to do and not bale to do is to connect to the databse from my application for which i need a driver . Now this application works fine when run from the console but when converted into a jar file , it fails to connect saying that the drivers are not installed .
Logically my setting the jar file in the class path did not help . I think you are right .... why do i need to edit my classpath.
How do i connect to the databse when my application is converted into a jar file . Do i need to bundle the drivers's jar file inside my own jar file ?
Please guide me a bit .
[ May 11, 2003: Message edited by: raghav mathur ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like a classpath problem. Are you sure you specified the classpath in the JAR manifest correctly. Take a look at The Creating an Executable JAR File Thread (towards the bottom) for simple instructions.
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Are you sure you specified the classpath in the JAR manifest correctly. [/QB]


No . I only mentioned the class file and the manifest version.
Do i need to include my own jar application in the manifest file too ?
Secondly if i do not want to set the classpath and want the drivers to be loaded with the load of my own jar application ?
Why am i asking this is because i might even need to provoke the JRE jar files from my own jar file .
what do you say ?
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have modified the manifest file and included the claspath also .
My manifest file looks like this :
Manifest-Version: 1.0
Main-Class: servunis
Classpath: server.jar
server.jar(my application) is in the same folder where the manifest file is kept and the jar file.
Still it didn't work .
[ May 12, 2003: Message edited by: raghav mathur ]
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK
I tried my application to connect with MS acces . Its did!
I made a jar file of this applpication and tried . It did !
I tried the same thing with MySql database( on another ip). It did !
I made a jar file of this application and tried. IT DID NOT WORK !!!
It works with access . The application works with MySql too but when converted into a jar file ... it just refuses to connect .
I,am in a fix
[ May 12, 2003: Message edited by: raghav mathur ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your manifest file is wrong. Take a better look at the aforementioned tutorial on creating executable JAR files.
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please tell me where did i go wrong ??
Now i've included the drivers jar file inside my own jar files manifest .
That's what the tutorial say
http://java.sun.com/docs/books/tutorial/ext/basics/download.html
[ May 12, 2003: Message edited by: raghav mathur ]
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried this :
manifest file for test.jar:

I 've included the drivers path in the classpath variable and fired the following command:

Note :I've already created a test.jar
[ May 13, 2003: Message edited by: raghav mathur ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic