File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Using Mysql dll Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Using Mysql dll" Watch "Using Mysql dll" New topic
Author

Using Mysql dll

Oyewale Oyelami
Greenhorn

Joined: Mar 15, 2011
Posts: 8
I develop a java application which uses mysql as its database.. and after deployment every user after installation
will have to install the mysql database on its own setting the username and password as used in my program
connection string.. my is that i want to reduce the stress of installation which makes the size of the packaged
executable file heavy.. so i guess i should be able to use the \DLL of which i just download it but does not know how to use it..
Or better still if there is another means to solve this challenge..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41600
    
  55
Why are you using MySql if you want to distribute the DB? It would be much easier with something that doesn't require an actual installation process, like Derby.

As an aside, I don't think you're going to get a functioning MySql installation by distributing some DLL.


Ping & DNS - my free Android networking tools app
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14114
    
  16

There are several small databases that you can easily distribute together with your application. Ulf already mentioned Apache Derby. There is also Java DB, which is included with the JDK / JRE (and which is essentially the same as Apache Derby). There is also HSQLDB.

Note that all of these are 100% Java - no native DLL needed, and they work on any operating system that runs Java, not only on Windows.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Oyewale Oyelami
Greenhorn

Joined: Mar 15, 2011
Posts: 8
Thanks you for all your contribution... but i have never try these.. can you please give the connection string to any of them... better still a step by step to use any of them ..thanks..
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19679
    
  18

How about you ShowSomeEffort instead? If you click on the "HSQLDB" link from Jesper's post, you see links to "FAQ", "Documentation" and "How To" at the top right. The "Apache Derby" link has a page with a "Documentation" tab. Likewise for the "Java DB" link. So read through these first.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Oyewale Oyelami
Greenhorn

Joined: Mar 15, 2011
Posts: 8
i have downloaded the HYsql and try to use it.. can you please just show me the connection string or how to use it.. i try to read the documentation but cannot get through.. i uses Netbeans IDE
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19679
    
  18

http://www.programmingforfuture.com/2010/06/using-hypersql-hsqldb.html
That's the page you get to by going to the HSQLDB page, clicking on "How To", "User Guides", "Getting Started".

http://hsqldb.org/doc/2.0/guide/running-chapt.html#running_connecting-sect
This time, it's "Documentation", "HyperSQL User Guide", "Connecting to a Database Server". Reading through this leads me to look at the API, especially the JDBCConnection class.

So back to "Documentation", this time selection "JavaDoc" and location the JDBCConnection class on the left.


Now that should definitely be enough to help you on your way. I don't want to see any more questions without saying you "can't" without an indication of what you have tried. Like I said before, you should ShowSomeEffort. I mean, the ZIP file contains folders like "doc", "sample" and "/src/org/hsqldb/sample". I bet you haven't even checked those out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Mysql dll