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
- Uncompress this file.
- Create a directory <eclipseHome>/drivers/mysql-connector.
- Copy the .jar file within this download into the directory.
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:
I got this error when try to connect to database:
!com.quantum.util.connection.ConnectionException.couldNotInstantiateDriver!
Can you help?
Thanks.
Solved!
I use wrong .jar file :D
Anyway, thank's for the article.
Great help this blog. Thanx VERY much Malibu!!
Post a Comment