Sunday, July 29, 2007

Supercharging your Eclipse configuration with Subclipse and Quantum DB

Supercharging your Eclipse configuration with Subclipse and Quantum DB

In this article, I will document the steps I followed to create my Eclipse development environment. This by no means covers all the Eclipse plugins, and I am by no means an expert in Eclipse plugins. The steps I followed below got me to a pretty good environment for PHP development with MySQL. Specifically, I am developing with Symfony but I am saving the Symfony specific config for another article.

This article assumes that you have set up Eclipse already. Reference my articles for Windows XP and Ubuntu Linux for specifics on how my config goes..

Conventions used in this article: <xamppHome> refers to the directory containing the xampp binaries. <eclipseHome> refers to the directory containing the Eclipse binary.

So here we go!

Step 1: Install Quantum DB
Quantum DB will give you a perspective within Eclipse that is a nice interface to manage your MySQL Database.

Step 1.1: Install MySQL Connector
You will need a specific java driver for connecting to a MySQL database with Eclipse. Download it here:

http://dev.mysql.com/downloads/connector/j/5.0.html

  1. Uncompress this file.
  2. Create a directory <eclipseHome>/drivers/mysql-connector.
  3. Copy the .jar file within this download into the directory.
Step 1.2: Install Quantum DB

Download the plugin here:
http://sourceforge.net/project/showfiles.php?group_id=7746

Uncompress the file. Copy the uncompressed contents of the file directly into <eclipseHome>/plugins.

Step 1.3: Connect to your database

Now you will use Quantum DB to connect to your database. Open up Eclipse. Select Window->Open Perspective->Other.. Then select Quantum DB. Right click in the 'Database Bookmarks' pane. Select 'New Bookmark'. Select 'Add Driver..'. Now 'Add External JAR'. Browse to the file you copied in step 1.1. Beside 'Class Name' click on Browse. Select 'com.mysql.jdbc.driver' and hit 'OK'. Finally on the main screen hit 'Finish'.

Now the mysql driver should appear in the JDBC Driver window. Make sure it is selected and hit 'Next..'.

Enter the specs for your database and hit Next. Enter a name for this bookmark and Finish. You should now see your shortcut in the Database Bookmarks pane. You should be able to expand the bookmark and see the aspects of your database.


Step 2: Install Subversion support.


Within Eclipse, select Help->Software Updates->Find and Install..

Select 'Search for New Features to Install'. Hit 'Next'.

Select 'New Remote Site..'
Name: Subversion
Url: http://subclipse.tigris.org/update_1.2.x

Now on the main screen ensure Subclipse is checked. Hit 'Finish' and follow the instructions to install Subclipse.

When you are done, you will have a 'SVN Repository Exploring'. You can use it to connect to your repository and do all the operations you need to.

3 comments:

Lokamaya said...

I got this error when try to connect to database:
!com.quantum.util.connection.ConnectionException.couldNotInstantiateDriver!

Can you help?

Thanks.

Lokamaya said...

Solved!
I use wrong .jar file :D

Anyway, thank's for the article.

GonzoRadio said...

Great help this blog. Thanx VERY much Malibu!!

About Me

I currently work designing infrastructure for websites representing a large insurance firm. I webdev in my spare time. If you're into hockey, check out my hobby site: nhlhockeypool