diff --git a/tools/maven/plugin/src/main/java/org/teavm/maven/TeaVMCompileMojo.java b/tools/maven/plugin/src/main/java/org/teavm/maven/TeaVMCompileMojo.java index d02f6746a..cb3067403 100644 --- a/tools/maven/plugin/src/main/java/org/teavm/maven/TeaVMCompileMojo.java +++ b/tools/maven/plugin/src/main/java/org/teavm/maven/TeaVMCompileMojo.java @@ -262,7 +262,7 @@ public class TeaVMCompileMojo extends AbstractMojo { try { RemoteBuildService buildService; try { - Registry registry = LocateRegistry.getRegistry(daemon.getPort()); + Registry registry = LocateRegistry.getRegistry("localhost", daemon.getPort()); buildService = (RemoteBuildService) registry.lookup(RemoteBuildService.ID); } catch (RemoteException | NotBoundException e) { throw new MojoExecutionException("Error connecting TeaVM process", e);