Showing posts with label eclipse. Show all posts
Showing posts with label eclipse. Show all posts

Thursday, May 19, 2011

Optimizing Eclipse for Mac OS X

This section will outline a few options that can increase the performance of running Eclipse on the Mac OS X platform. To do this you need to modify the eclipse.ini file. by right-clicking (or Ctrl+click) on the Eclipse executable in Finder, choose Show Package Contents, and then locate eclipse.ini in the MacOS folder under Contents.

  • Open the Finder Locate the Eclipse program 
  • Right-click on the Eclipse program, select “Show Package Contents” 
  • Open the Contents folder 
  • Open the MacOS folder 
  • Open the eclipse.ini file with TextEdit
  • Change the file contents to add/update the following: 
-showsplash org.eclipse.platform 
--launcher.XXMaxPermSize 256m 
-vm /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java 
-vmargs 
-Xms128m 
-Xmx512m

It’s important to note a few things.  The “-vm” argument must be on it’s own line.  After that you can specify your Java virtual machine to make sure you’re using the latest version.  This probably isn’t a big deal on the Mac platform, since there’s usually only one provided by Apple, but on a Windows system you may have a plethora of Java installs.

Also the “-vmargs” must come AFTER you specify the version of Java to use.  After this you can specify the memory settings for the JVM.  I’m setting the default memory allocation for Eclipse to be 128MB and the maximum to be 512MB.   You can adjust yours accordingly.

Wednesday, May 18, 2011

Working with Microsoft SQL Server from Eclipse/CFBuilder

After attending the “Time Management for Developers” session at cf.Objective() I’m trying to use Eclipse more so I can stay focused in one IDE, rather then contining to switch between applications during my development workflow.  One of the things I would often do is switch between my code editor and my virtual server interface to use the Microsoft SQL Server Management Studio for writing SQL code.  I decided to change this by using the SQL Explorer perspective in Eclipse/CFBuilder to do this.

Here’s a quick run down on how to configure Eclipse/CFBuilder for this.

Download SQL Server JDBC drivers

Microsoft, as usual (IMHO), makes this confusing by having four different drivers listed on their download site for this.  In the end what you want is the sqljdbc4.jar file.

  • Download Microsoft SQL Server JDBC Driver 3.0
  • Extract the archive and locate the /enu/sqljdbc4.jar file
  • Copy this file to some location on your system that you can point Eclipse/CFBuilder to (I put it in a folder on my Dropbox folder)

Install SQL Explorer

  1. Open the Eclipse/CFBuilder program
  2. Select the Help menu > Install New Software….
  3. In the Work with text box, enter:  http://eclipsesql.sourceforge.net/
  4. Click the Add… button. In the dialog that shows, click OK (keep the name blank, it will be retrieved from the update site.)
  5. Check the box next to “SQL Explorer”.
  6. Click the Next button
  7. Follow the prompts to accept the terms of service and install the plugin.
  8. When the installation is complete, Eclipse prompts you to restart. Click Yes. Eclipse restarts. The plugin is installed

Configure SQL Explorer

  1. Open the Eclipse preferences (on the Mac these are under the Eclipse application menu in the top-left, then select Preferences)
  2. Scroll down the list on the left to expand “SQL Explorer” and select “JDBC Drivers”
  3. Under the “JDBC Drivers” on the right, select “Microsoft MSSQL Server JDBC Driver”, then click the “Edit” button
  4. Click on the “Extra Class Path” tab
  5. Click on the “Add JARs…” button
  6. Select the sqljdbc4.jar file you downloaded earlier
  7. Click the “List Drivers” button
  8. Click the “OK” button
  9. Click the “OK” button

Connecting to MS SQL Server

  1. Click on the “Window” menu, select “Open Perspective”, select “Other”
  2. Scroll down to select “SQL Explorer”
  3. In the “Connects” tab, click on the “Create New Connection Profile”
  4. Setup the connection information for your specific server and click the “OK” button to save your information.
  5. Click the “Open New SQL Editor” button