Uploading a file scenario, i am mentioning the file path as like "D:\Workspace\MyProject\InputData\file1.jpg". Mentioning full system file path even the upload file is inside my project source folder.
StringSelection ss = new StringSelection("D:\Workspace\MyProject\InputData\file1.jpg");
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null);
But while I run my code in another machine - I need to update file path.
I tried following code because upload file is inside the source folder, but it hasn't worked
StringSelection ss = new StringSelection("InputData\file1.jpg");
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null);
Is it any other method to mention the file path (as like only mention source folder file path) without mentioning the system whole path?