0

I have a path in windows as:

C:\\Users\\Sneha\\.netbeans\\5.5.1\\tomcat55.properties

How can we convert the above path to Linux path. what does .netbeans and tomcat55.properties path means. Any help would be appreciated.

4
  • 2
    This is a path pointing to a file named tomcat55.properties. But what do you mean by "converting"? Commented Jul 6, 2016 at 7:05
  • probably duplicates with stackoverflow.com/questions/26984907/… Commented Jul 6, 2016 at 7:16
  • Converting the path alone will not help you unless you have the same directory structure on the Linux machine. If you just want to convert it will be: /home/Sneha/.netbeans/5.5.1/tomcat55.properties. Because there is no concept of a drive on Linux every path starts with /. Commented Jul 6, 2016 at 8:16
  • Yeah right....conversion just would mean \ to /... I actually wanted to know what .netbeans and tomcat55.properties mean......If tomcat55.properties refer to a file, I am unable to find properties file....Is "properties" something we do on right click and properties.... Commented Jul 6, 2016 at 13:25

1 Answer 1

1

you should read this webpage to understand difference between file system in linux and windows.

to convert that windows path to linux path, you must know that names of directories and files are case sensitive in linux,

then except using C:\\Users\\Sneha use this method in java to get current user path in any machine(windows, linux and etc.)

String user_dir = System.getProperty("user.home");

then in linux, path contains only forward slash /. not backward slash \.

so the path you said

C:\Users\Sneha\.netbeans\5.5.1\tomcat55.properties

will be

/home/Sneha/.netbeans/5.5.1/tomcat55.properties

also

  • .netbeans is a folder,
  • tomcat55.properties is a file.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.