I have created shared folder (common_folder) on Linux, which I want to access by Windows as well as Linux System.
Programming language is Java. I am using "//IP address/common_folder" as folder path so that it will be accessible to both Linux and Windows.
{{ File folder = new File("//IP address/common_folder"); }}
When I am trying to get the folder using above line in Linux machine, it gives folder path as: "/root/eclipse///IP address/common_folder". However I want only '//IP address/common_folder' as a folder path because my folder is available on that path.
How to get the folder of mentioned path in Linux using java?
您必须使用java lib中存在的File.separator
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.