views:

202

answers:

5

I'm coming from the .Net camp where virtualization was much more prevalent do to the need to run on server software and system-wide entities such as the GAC.

Now that I'm doing Java development, does it make sense to continue to employ virtualization? We were using VirtualPC which, IMO, wasn't the greatest offering. If we were to move forward, we would, hopefully, be using VMWare.

We are doing web development and wouldn't use virtualization to test different flavors of server deployment.

Pros:

  • Allows development environments to be identical across the team
  • Allows for isolation from the host
  • Cross-platform/browser testing

Cons:

  • Multiple monitor support is lacking (not in VMWare?)
  • Performance degradation - mostly I/O
  • Huge virtual disks
+6  A: 

One possible advantage is that you could technically test out the same program on a variety of operating systems and on a vartiety of JVMs.

Contrary to popular opinion, Java is not 100% portable, and it is very possible to write nonportable code. In addition, there are subtle versions between libraries. If you work with different JVMs, there could also be differences.

However, since Java IDEs are heavyweight, running an IDE within the VM may not be fun.

Java does support some forms of remote deployment, might be beneficial to explore those while still doing the IDE work locally.

Uri
Remote-deployment of application is very mature when used with Tomcat or certain J2EE containers.
James Schek
My shop does exactly this. We have application servers setup in a variety of VMs(win/sol/lin) on an ESXi rack. Using Hudson for integration, we deploy new builds and test all them time. Development is always on our desktops.
basszero
Sounds like fun. What programs do you guys build?
Uri
+2  A: 

I don't like developing in a VM. The good thing is, in contrast to what you're writing as cons, that multiple monitors are supported by VMWare and the huge disk thing isn't really a problem since VMWare runs surprisingly smoothly from USB hard disks.

Running the heavyweight IDEs for Java, as Uri said, won't be much fun in a VM. But then, running Visual Studio in a VM isn't really fun as well. So if you were happy with VS in a VM, then give it a try for Java, because the cons aren't as strong as you might think :)

OregonGhost
Are there any other cons?
Ryan Emerle
No. The main con is speed. And 3D acceleration isn't as mature as it should be, I think.
OregonGhost
+1  A: 

You said your doing java web development so it makes sense to test your application using different web browsers on different operating systems. VMware will be useful for this.

The Netbeans IDE is operating system independent, so you can have developers working on different operating systems with out any trouble.

Mark Robinson
We have control over the target browser. No cross-browser testing is needed.. yet. :)
Ryan Emerle
you've got it made ! ;)
Mark Robinson
+1  A: 

I run eclipse inside a VirtualBox instance and it works fine. I've used VMWare in the past and that's fine too.

I like having my development environment segmented away from whatever the rest of my PC is doing (playing games, surfing the web, reading email, etc...)

I work from home so virtualization provides necessary separation of work/play. It also allows me to upgrade each environment separately and have much more control over the environment.

Also I can safely try something new and revert if the install goes "wonky". Sorry for the highly technical term. ;-)

Edit: It also allows me to satisfy the corporate VPN access requirements without subjecting my home environment to excessive corporate influence.

Chris Nava
+1  A: 

If you need a VM to verify that the app will also run on a different OS, you can cover quite some ground by using a continuous integration server and start/run VM instances on that machine (ie. Linux / Windows / OSX). Then unpack the latest build, run unit-tests on the delivered classes. Then run automated integration tests. You will then have to report the results back to the CI-environment. If the integration tests are good, this can catch a lot of the common multi-platform mistakes right after they are committed to the SCM.

kungfoo