I have made a java application that sometimes should call a batch file in order to move a video from a folder to another. The batch file is in the same directory of the main class of the project (ProjectName\src\move.bat).
I got the path of the batch file through the instruction:
String pathMoveBat = new java.io.File("src\\move.bat").getAbsolutePath();
and I use the code below (which is called by pressing a button in the application) to call that file:
Process move = Runtime.getRuntime().exec(pathMoveBat+" "+username+" "+dateFormat.format(currentDate)+" "+i+"");
Basically, when I click on the button nothing happen and seems that Windows cannot find the file move.bat.
Is there any other way to call that file from a jar?