Reputation: 7042
Option Copy Qualified Name
in Eclipse
give me the complete file name in this way
/ProjecName/src/packageName/fileName
Now when Use this path any where in my windows it require \
instead of /
as separator
How can I get the file name
\ProjecName\src\packageName\fileName
This way
Because every time I have to replace this manually again with a text editor. Is there a setting or direct way to gain what I want.
Upvotes: 1
Views: 59
Reputation: 13556
this is not quite as comfortable as the copy qualified name option, but:
location
property value in the Properties ViewUnfortunately the context menu option Copy for the Properties View will also copy the property name so that the result is the concatenation of name and value.
Upvotes: 3
Reputation: 4418
Use this :
String workingDirectory = System.getProperty("user.dir");
String absoluteFilePath = "";
absoluteFilePath = workingDirectory + File.separator + filename;
System.out.println("Final filepath : " + absoluteFilePath);
Upvotes: 0