I am trying to locate the path of the current running/debugged project programmatically in Java, I looked in Google and what I found was System.getProperty("user.id")
, which didn't get me the project's path.
I know the command Environment.currentDirectory
in C# gives the path of the current running/debugged project,so I am sure there must be a similar way in Java, too.
So I am asking if anyone could tell me or give me a code to how locate the path of the currently running/debugged project programmatically?
edit: i am writing plugin which loads with eclipse start. the plugin adds a button to the workbench of eclipse, with in the code of the plugin when i click the button i search for the current directory path.
my purpose is that when for example i debug a project and then click the button, a window will pop up presenting the debugged project's path, thanks