Home » Java » rmiregistry launches an InvalidPathException when run from eclipse on Windows

rmiregistry launches an InvalidPathException when run from eclipse on Windows

Posted by: admin October 26, 2017 Leave a comment

Questions:

I’m doing a simple Hello world application in Java using RMI. I’m at the point where I need to start rmiregistry, so I added it as an external tool in eclipse giving it ${workspace_loc}/${container_path} as working directory and no other additional parameters. When I try to run rmiregistry from eclipse I get this error:

java.nio.file.InvalidPathException: Illegal char <:> at index 2:  D:\workspace\PROGDI\bin\
    at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
    at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
    at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
    at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
    at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)
    at java.base/java.nio.file.Paths.get(Paths.java:84)
    at java.rmi/sun.rmi.registry.RegistryImpl.pathToURLs(RegistryImpl.java:414)
    at java.rmi/sun.rmi.registry.RegistryImpl.createRegistry(RegistryImpl.java:521)
    at java.rmi/sun.rmi.registry.RegistryImpl.main(RegistryImpl.java:558)

I don’t know what the hell is going on. How do I solve this? I tried changing the tool’s working directory, but that didn’t affect the error.

Answers: