Navigation

ADS specializes in using Ruby on Rails to build advanced, scalable, database-backed web sites for organizations of all sizes. Find out more at our website.

Atlantic Dominion Solutions

We work with a number of enterprise-level clients who have a lot of existing Java infrastructure in place. Usually the IT department is running the show and determines what is installed on servers. Sometimes they demand that that be Java.

For the past few weeks I have been reviewing the latest Java web frameworks to see what we should add to our toolbox. What I’m looking for is a web framework that gives us the productivity benefits of Rails, and doesn’t require me to write as much Java code as years past. I was lucky enough to meet Keith Donald, the lead of the Web Product team at SpringSource, at the Orlando Java Users Group. Kevin discussed Spring 2.5, which looks very cool, so I’m looking into it. Previously though, our lead developer Chris had told me about Groovy and Grails, which looks very similar to Rails (MVC, use of an ORM). As Groovy and Grails appeared to have the least amount of learning curve, and I could buy a relatively up-to-date book on it, I started there.

I’m running the soylatte version of Java on my Mac. Unfortunately, the latest versions of Groovy and Grails didn’t seem to like it. So, as I am a fan of using the latest stuff, I fired up VMWare Fusion and installed Ubuntu 8.04 desktop edition. Once Ubuntu was installed and updated, here is how I got everything going.

Installing Java

To install the latest version of the JDK (1.6.0_06-b2), run the following command in your terminal:

sudo apt-get install sun-java6-jdk

Java should be added to your $PATH variable. Test it out by running:

java -version

If it prints out the version number you are good to go.

Installing Groovy

I installed the latest stable version of Groovy - 1.5 at the time of this writing - using apt-get as well.

sudo apt-get install groovy

Installing Grails

To install Grails browse over to the Grails homepage and download the latest version (1.0.3 for me). I recommend getting the tar/gz version. Once you have it local, unpack it and put it where you want it (i.e. /home/rdempsey/grails-1.0.3). I use my home path on a development machine; don’t do that in production. Once you have the files in place, add the Grails bin directory to your $PATH to ensure that you can execute Grails from the command line.

/home/rdempsey/grails-1.0.3/bin

Installing NetBeans

The latest release of NetBeans, 6.5 Milestone 1, supports Groovy and Grails natively. Browse to the NetBeans homepage and download the “Web and Java EE version,” unless of course you want all the goods. You’ll need the web version at a minimum. Once the file is downloaded, make sure it’s executable:

chmod +x netbeans-6.5_m1-javaee-linux.sh

Launch the installer and follow the instructions.

./netbeans-6.5_m1-javaee-linux.sh

Once NetBeans is installed, fire it up go to Tools -> Options. Click the Groovy icon. You should see two tabs: Grails, and Groovy. Click the Grails tab, and enter in the path to Grails. Next, click the Groovy tab. If the Groovy path isn’t already filled in (with /usr/share/groovy), put in the path to the Groovy root directory.

Ready to Roll

You should now be ready to develop your first Groovy and Grails application.

Share this post

Related Posts

You can leave a response, or trackback from your own site.

Print This Post Print This Post

3 Responses to “Installing Java, Groovy, Grails, and Netbeans in VMWare for Groovy Development”

On July 12th, 2008 at 10:15 am Web 2.0 Announcer said:

Installing Java, Groovy, Grails, and Netbeans in VMWare for Groovy Development…

[...]Installing Java, Groovy, Grails, and Netbeans in VMWare for Groovy Development.[...]…

On October 22nd, 2008 at 6:48 am Mohamed said:

Is it possible to make VMware as a live destro on a USB ?

On October 22nd, 2008 at 8:18 pm Robert Dempsey said:

That’s a great question. Not as far as I know.

Leave a Reply