I am running jar file from command prompt to copy text file from one folder to other using command.
java.exe -jar CopyFile.jar D:\abc\hello.txt E:\copy\hellocopy.txt
I tried like this:
Runtime.getRuntime().exec("java.exe -jar "+jarFilePath+"CopyFile.jar" +" "+ filePath +" "+ copyFilePath);
I want to execute same jar file with 2 parameters from java program. How can use this command in other java program.