Need to upload an image using the relative path, which I would like to run on both IDE and command line.
Here is the code which runs with the absolute path,
File classpathRoot = new File(System.getProperty("user.dir"));
File picturesDir = new File(classpathRoot, "/pictures");
File picture = new File(picturesDir, "profileImage.jpg");
String picturePath = picture.getAbsolutePath();
File file = new File(System.getProperty("user.dir")+"/pictures/profileImage.jpg");String picturePath = file.getAbsolutePath();? – Rao Jan 05 '16 at 19:27