Search code examples
javanetwork-programminggatewaysmbjcifs

How to access folder of PC in other network via gateway pc in Java?


I want to read files from a network share with Java. Using jcifs works fine when accessing computers within the same network.

Now I need to read files from a computer in another network that is only accessible via a "gateway" pc:
enter image description here

Is this possible? If yes: how? (All computers run with Windows.)


Solution

  • I'm not sure if there exists something already implemented that does what you want, but if I was going to develop this from scratch, probably I would develop some piece of software on the "gateway pc" for forwarding the requests from "my pc" to the "target pc".

    Maybe you can use NFS4J, it works like a charm.

    https://github.com/dCache/nfs4j