I\'m trying to run a exe file in path outside of the current package. My code.java file that runs it is in
%Workspace_path%\\Project\\src\\main\\java\\com\\u
Well,in your context,the project root is happen to be the current path
.
,that is where the java.exe start to execute,so a easy way is:
String exePath="src\\main\\resources\\program.exe";
File exeFile=new File(".",exePath);
System.out.println(exeFile.getAbusolutePath());
...
I tested this code on Eclipse,It's ok. I think is should work on different ide. Good Luck!