eclipse - Java resolve project path -


i trying return project's file path create file in said path. created file in path used static path project rather resolving programatically need do.

using docs i've tried creating file:

    path path = paths.get("c:\\folder\\folder\\folder\\folder\\folder\\report\\");     string filepath = path.tostring() + "filename.pdf";     createfile(filepath, data, moredata); 

question:

what if else uses d: drive or other? how resolve report folder if case?

use relative path file, rather absolute path.

path path = paths.get("reports/filename.pdf"); string filepath = path.tostring() + "filename.pdf"; createfile(filepath, data, moredata); 

Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -