I can't get the path of my project. I have tried many ways but the result is the path of the directory of eclipse and I don't know why.
Note that I didn't create the project, I imported it.
Here is what I have tried:
The first :
private String destination = new File("").getAbsolutePath()+"\\";
The second:
IWorkspace workspace = ResourcesPlugin.getWorkspace();
File file2 = workspace.getRoot().getLocation().toFile();
private String destination = file2..getAbsolutePath()+"\\";
The third:
private String destination=System.getProperty("user.dir");
All of these methods didn't work for me and I don't know why.