I want to drag a file into a .bat file. After I dropped it, I want to run the jar file with the remote file path as input. How can I run jar file with relative path? The dir my.bat file is running - this is my user directory, not the directory where it is located.
goal: cmd /c java -jar myjar.jar -f %1
current: cmd /c java -jar c:\somewhere\myjar.jar -f %1
The fact is that the program (jar + bat) is part of a small automated deployment process, and for each user there may be a different way to launch jar.
source
share