Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any benefits to developing Java in a virtual machine?

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
like image 928
Ryan Emerle Avatar asked Dec 08 '25 12:12

Ryan Emerle


2 Answers

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.

like image 51
Uri Avatar answered Dec 11 '25 00:12

Uri


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 :)

like image 43
OregonGhost Avatar answered Dec 11 '25 00:12

OregonGhost



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!