With two java courses under my belt I took some time over summer break to write a small java application. Mdb2Mysql is a tool for converting Access databases into MySQL databases. I used the Jackcess API from to read the Access files. After playing around with the API for bit to get the hang of how I needed to use it I started with a CLI program that would list the tables and display the table schema of the open file. From there I moved on to have it write out Valid MySQL statements to create the new database to a text file. Then I added the MySQL login part and used the JDBC driver to send the statements one at a time to the server recreating the Access databases contents on the server.

Then it was Swing time. While I had hand coded all the Swing exercises in my java classes, it didn’t take me long to realize I needed to use a more full featured IDE than gedit (ok, gedit is not an IDE). So I spent some time just trying to figure out how to use NetBeans. I have to say Netbeans can be really slow sometimes. It was on one of those mornings that I was waiting for NetBeans to finally warmup that I started poking about on google and found the (perhaps bad) tip that OpenJDK performs significantly slower than Sun/Oracles JDK. So a Yak shaving I went. I downloaded the JDK directly form Sun/Oracle and installed it in /usr/local/etc/, which may not have been the right place for it( later moved it to /usr/lib/jvm/). Just for good measure I installed the latest NetBeans, version 7.0. I though that I was all ready to go, but while netbeans had no problem finding the new JDK the rest of the computer was somewhat confused. I though that If I removed the open JDK it would settle on the new one but that turned out not to be the case.

After uninstalling and reinstalling things numerous times I finally got it all working, but for a little while I had the unfortunate experience of having one JDK not compile and another not work at runtime. Not to be slowed down I for a little while I was composing the code and compiling it in netbeans and then testing it from the command line. In the end the problem was that each JDK had different libraries, when I got them all sorted out everything finally just worked.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s