Development environments and their configuration can become quite complex. It’s not unusual that a complete workstation setup takes half a day or more and requires extensive help from other project members. Using virtual machines for the runtime environment can help to reduce setup and maintenance costs.
For large Java web applications, you often need to set up a database server (with a suitable database snapshot), an application server, a web container, maybe a frontend Apache server and other components before writing the first line of code. Every new developer on the project has to go through this exercise and everybody has to keep the system current. More often than not, each system is a bit different, especially if developers use different operating systems or work on multiple projects with each having its unique set of requirements.
The idea to end this pain is simple: Create a virtual machine image that is as close to the deployment environment as possible. Install everything necessary to run your application. Set up bridged networking (as opposed to NAT) to make your network stack available from the host machine. Depending one your local network setup, you might be able to use DHCP and central user management. Things aren’t exactly trivial here, but a good sysadmin should be able to help. The good news is that you only have to do this once and the base system can be reused for other projects as well.
Development takes place on the host machine, so developers can work with their favorite operating system and IDE. Each developer gets a copy of the virtual machine image (the application runtime environment) and can start working in no time. You build the application locally on the host system and deploy it to the virtual machine using a network share. That way, you standardize on the runtime side and people can still work with the tools of their choice.
Additionally, you can install the virtual machine image on a dedicated host to act as a central testing or demonstration system. You could even make your continuous integration system deploy to it, too.
Just try it, the little bit of extra effort quickly pays off.