I am trying to access the file "J:\Java\NetBeansProjects\List of forgoten things\list.eml" and open it using the OS-defined default application. This can be acomplished in the command prompt by calling
cd "J:\Java\NetBeansProjects\List of forgoten things"
"list.eml"
so I decided to use
Runtime.getRuntime().exec("cd \"" + System.getProperty("user.dir") + "\"\n\r" + "\"" + selectedFile.getName() + "\"");
but it keeps giving me an IOException:
java.io.IOException: Cannot run program "cd": CreateProcess error=2, The system cannot find the file specified
does anyone have any experience or advice they would like to share?