Sunday, September 30, 2007

Getting Started - Part II (Installing Eclipse / CFEclipse)

So I finally installed Eclipse. In the end I was triumphant, but the install was a little rocky. First I want to stress that most of this was not due to a lack of solid documentation on the Eclipse site. In my zeal to get started, I overlooked a few things. As I believe we learn as much from failures as we do successes, I decided to share the whole gory tale, warts and all.

First I visited the Eclipse download page and was surprised to find several versions of Eclipse available. I reviewed the comparison of the available packages and decided to install the Eclipse IDE for Java Developers.




I knew a Java runtime environment (JRE) was required to use Eclipse. But fortunately I had already installed a version a while back for another application. Armed with that knowledge, I was ready to begin installing.

I downloaded Eclipse and extracted the files to c:\eclipse. Then I double clicked c:\eclipse\eclipse.exe to launch the application and voila, the splash screen appeared. Eclipse prompted me to select a workspace. Since I prefer not to have my files strewn over multiple directories, I created my workspace in c:\eclipse\workspace.


After clicking OK, Eclipse launched the welcome screen. I opened the workbench and all seemed well, so I moved on to the next step: installing the CFEclipse plugin. I installed the CFEclipse plugin using the instructions for the built-in installation and update tools


1. Select the "Help->Software Updates->Find and install" menu option
2. On the screen that is displayed, select 'Search for new features to install' and click the 'Next' button
3. Now click the 'New Remote Site' button
4. Enter a name for the update site, for example "CFEclipse". In the URL box, enter "http://www.cfeclipse.org/update" and click the OK button
5. You should now have a 'CFEclipse' node in the 'Sites to include in search' box.
6. Tick the 'Stable CFEclipse' box and click 'Next'
7. Eclipse will contact the CFEclipse site and retrieve the list of available plugins. Tick the plugin with the highest version number and click 'Next'
8. The next instructions are self-explanatory, agree to the license, install the software and restart Eclipse
Once Eclipse has restarted CFEclipse should have been successfully installed


During the installation, I did note there was no 'Stable CFEclipse' option in my version. So I just accepted all of the defaults and followed the rest of instructions. The version I installed was CFEclipse 1.3.1.5, which includes CFUnit and Frameworks


After the install was complete, I went to open the CFEclipse perspective so I could create my first CF project.

  • Window -> Open Perspective -> Other -> CFEclipse [OK]


That is when I hit my first snag. Instead of opening the perspective, I received the error "Problems opening perspective 'org.cfeclipse.cfml.perspective.CFML'".



Huh.. what is wrong with my perspective? Having no clue what the error meant, I did some googling and discovered there is an issue with involving Eclipse and JRE 1.4.2. The suggested solution was to install either JRE 1.5 (or 1.6). Now I was relatively certain I did not have 1.5 or higher installed. But that did not concern when I first read the Eclipse requirements because they stated 1.5 was recommended not required. Well, I guess I took a gamble and lost. I checked my JRE version and I confirmed that I was indeed using JRE 1.4.2

  • Window -> Preferences -> Java -> Installed JREs




Off I went to www.java.com to download a newer JRE. I chose the more recent version JRE 1.6. 0_02. Though confusingly it was referred to as Version 6 Update 2. After installing it, I went back into Eclipse to add 1.6. 0_02 to my list of Installed JREs.

I clicked[Add] then navigated to the directory where I had installed JRE 1.6. In my case it was D:\Program Files\Java\jre1.6.0_02 but yours may differ.



I clicked [OK] and back in the main window I checked the box next to JRE 1.6.0_02 and clicked [OK] again. Almost done, I thought to myself. Feeling triumphant I went to open the CFEclipse perspective. But to my surprise I received the same darn error!

Then I realized the Eclipse was probably still loading with the old JRE, since I had not uninstalled it. With a little help from wiki.eclipse.org I discovered I could specify which JRE Eclipse should use in the eclipse.ini file. So I made a backup of c:\eclipse\eclipse.ini, then opened the original with notepad and added the "vm" parameter. Once I saved the eclipse.ini file and re-started Eclipsed, presto! The CFEclipse perspective opened like magic.


  -vm d:/program files/java/jre1.6.0_02/bin/javaw.exe -showsplash org.eclipse.platform --launcher.XXMaxPermSize 128M -vmargs-Xms40m -Xmx256m


Well, that is enough for now. Hope this helped someone or at least provided some entertainment ;) For those of you that prefer a less rocky path, there are some excellent screen casts on the Eclipse site, under "Tutorials and Help"

Installing and Using the Eclipse IDE for Java Developers
Adding Features from the Europa Discovery Site
Test First Development using Eclipse


As always, suggestions, comments, corrections and commiserations are welcome ;)

2 comments:

turbotad July 2, 2009 at 8:45 PM  

Question: I'm pretty new to ColdFusion, but am more experienced running J2EE type boxes. I'm trying to set up a ColdFusion dev server on a VM with limited memory, and I'm trying to trim it back so that it doesn't pork out and use every bit of memory on any computer within a 10 mile radius. I.e. trying to get it so that it perhaps doesn't fire up all of the Flash remoting servlets or other things I don't need for basic CF functionality, in hopes that this might trim back the RAM usage. Any help you might be able to be on this?

cfSearching July 6, 2009 at 1:14 PM  

@turbotad,

Unfortunately not. I usually run the full set of services. You might try asking on the cf-talk list.

http://www.houseoffusion.com/groups/cf-talk/

-Leigh

  © Blogger templates The Professional Template by Ourblogtemplates.com 2008

Header image adapted from atomicjeep