Java: Accessing Windows files from Linux machine

djb

I've got a Java program that saves a new PDF file to a shared network location.

On Windows, it works fine, using backslashes

serverDirName=\\\\10.20.1.1\\c$\\input

To try skip all the complexity of permissions, I've set the sharing on that folder in Windows to Read/Write for "Everyone".

I'd like to try run the program from a linux server.
Straight off the bat, I get:

Error: java.io.FileNotFoundException: \\10.20.1.1\e$\input/8106070121089/Doctor-Diagnosis-201003291.pdf (No such file or directory)

So I tried switching to:

serverDirName=//10.20.1.1/e$/input

and got:

Error: java.io.IOException: Directory '/10.20.1.1/e$/input/8103205007085' could not be created

I presume there's some basic network requirements that I'm lacking, in order to communicate with a Windows machine, but any idea what that is?

(OS is Centos)

Mike Adamenko

To access windows directory you should mount windows shared directory to your linux server.

See https://wiki.centos.org/TipsAndTricks/WindowsShares

After this you'll be able to use this windows directory as a local linux directory.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Accessing localhost from virtual machine

From Dev

accessing ubuntu files(installed in virtualbox) from windows

From Dev

How to copy files on remote Windows to local Linux on a Linux machine?

From Dev

Delete million of files from Windows machine using Java on Linux

From Dev

Accessing ubuntu virtual machine host from windows browser

From Dev

Accessing hadoop from remote machine

From Dev

Unable to ping a Windows machine from Linux

From Dev

Accessing a remote Windows "Git Bash" prompt from a Linux machine?

From Dev

Accessing Windows Box from Linux Terminal SSH

From Dev

How to recover files stored in a virtual machine running linux in windows 7

From Dev

Java code to copy files from one linux machine to another linux machine

From Dev

How to remote Shutdown Linux machine from Windows?

From Dev

Access to a windows 7 machine from a linux machine on a LAN

From Dev

Best way to copy a file from Windows machine to Linux machine using java

From Dev

Accessing .txt files from inside a folder (java)

From Dev

cannot ssh from linux to windows machine

From Dev

Linux mount nfs disk from windows machine

From Dev

Access directory on Linux machine from a Windows 7 machine over WAN

From Dev

Java code to copy files from one linux machine to another linux machine

From Dev

Windows Linux Subsystem - Accessing Files outside of Ubuntu

From Dev

Is it possible to see Linux files from Windows if they are installed on one machine?

From Dev

Accessing Windows from Linux/Mac by name using TCP/IP

From Dev

Accessing ubuntu virtual machine host from windows browser

From Dev

Accessing external HDD ext3 (Ubuntu/Linux) files from Windows 10

From Dev

Accessing partition created on Linux from Windows

From Dev

How to transfer files between a remote Linux machine and a local Windows machine?

From Dev

Accessing Time Machine backup from Windows/Linux laptops

From Dev

List specific files on a remote windows machine from a linux machine using sftp

From Dev

Could not fetch snmp values of a windows machine from linux machine

Related Related

  1. 1

    Accessing localhost from virtual machine

  2. 2

    accessing ubuntu files(installed in virtualbox) from windows

  3. 3

    How to copy files on remote Windows to local Linux on a Linux machine?

  4. 4

    Delete million of files from Windows machine using Java on Linux

  5. 5

    Accessing ubuntu virtual machine host from windows browser

  6. 6

    Accessing hadoop from remote machine

  7. 7

    Unable to ping a Windows machine from Linux

  8. 8

    Accessing a remote Windows "Git Bash" prompt from a Linux machine?

  9. 9

    Accessing Windows Box from Linux Terminal SSH

  10. 10

    How to recover files stored in a virtual machine running linux in windows 7

  11. 11

    Java code to copy files from one linux machine to another linux machine

  12. 12

    How to remote Shutdown Linux machine from Windows?

  13. 13

    Access to a windows 7 machine from a linux machine on a LAN

  14. 14

    Best way to copy a file from Windows machine to Linux machine using java

  15. 15

    Accessing .txt files from inside a folder (java)

  16. 16

    cannot ssh from linux to windows machine

  17. 17

    Linux mount nfs disk from windows machine

  18. 18

    Access directory on Linux machine from a Windows 7 machine over WAN

  19. 19

    Java code to copy files from one linux machine to another linux machine

  20. 20

    Windows Linux Subsystem - Accessing Files outside of Ubuntu

  21. 21

    Is it possible to see Linux files from Windows if they are installed on one machine?

  22. 22

    Accessing Windows from Linux/Mac by name using TCP/IP

  23. 23

    Accessing ubuntu virtual machine host from windows browser

  24. 24

    Accessing external HDD ext3 (Ubuntu/Linux) files from Windows 10

  25. 25

    Accessing partition created on Linux from Windows

  26. 26

    How to transfer files between a remote Linux machine and a local Windows machine?

  27. 27

    Accessing Time Machine backup from Windows/Linux laptops

  28. 28

    List specific files on a remote windows machine from a linux machine using sftp

  29. 29

    Could not fetch snmp values of a windows machine from linux machine

HotTag

Archive