How can I use a remote Java compiler?

I am working on a Java project that has a nice Vagrantfile for setting up a development environment on Linux. I can compile and run this application from Vagrant VM.

However, many of us use tools - IntelliJ, Eclipse, etc. - outside the VM. Although it is easy to exchange files between the local host and the virtual machine, it would be great to configure my IDE to use a remote compiler for things like autocomplete, static analysis, etc.

Is there any way to do this?

I know that I can do remote debugging in Java (a la -Xdebug , -Xrunjdwp , etc.). But what is the easiest way to do remote compilation? How to configure my IDE (or just use the command line) to invoke javac from a remote server and have an environment in which all my autocompletion and static analysis are based on my setting up javac and JVM for remote (roaming)

+5
source share
1 answer

As far as I know, there is no Java IDE that allows transparent use of a non-local JVM.

However, if the vagrant-controlled virtual machine is powerful enough, you can set up the desktop for the distribution that you use through the package system, and then run the full IDE inside your stray image. For a virtual box, you may need to use the virtual machine GUI to display the virtual machine screen in a window. You can also install virtual boxing tools.

0
source

Source: https://habr.com/ru/post/1200949/


All Articles