I'm working on a Java project which has a nice Vagrantfile for setting up a development environment on Linux. I'm able to compile and run that application from within the Vagrant VM.
However, many of us use tools - IntelliJ, Eclipse, etc - outside of the VM. While it is easy to share files between localhost and the VM, it would be great to configure my IDE to use a remote compiler for things like autocompletion, static analysis, etc.
Is there a way to do this?
I know that I can do remote debugging in Java (a la -Xdebug
, -Xrunjdwp
, etc.) But what is the most straightforward way to do remote compiling? How can I configure my IDE (or just use the command-line) to invoke javac
from the remote server and have an environment where all of my auto-completion and static analysis is based on my remote (vagrant) javac and JVM setting?