Re: Packaging Java libraries
> I recently sent out an ITP for a MySQL JDBC driver
> (http://mmmysql.sourceforge.net) and have started looking at how to package
> it up. This is my first attempt at a java package and a second attempt at
> packaging anything (the other being rdesktop). I've downloaded both the
> source and binaries, and it seems there are different Makefile targets
> depending on the JDK in use. How should I deal with this? Compile with the
> latest version? Both? Or just package up the binary? I'm using blackdown's
> j2sdk1.3, not jdk1.1.
You should download the binary version, and then put it into your CLASSPATH
(export CLASSPATH=drivername.jar:. for example). Then in your java-program
load the driver with: Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Then you get the Connection by using
DriverManager.getConnection("jdbc:mysql://127.0.0.1/databasename",
"username", "password");
You should now be able to make database requests.
Need more help? mail me!
/Nils Hoglund
Reply to: