I have a folder that has the batch file, along with a jar file and JRE. Batch file is supposed to run the jar by invoking the JRE. I know it would be something like:
<jre-path>/bin/java.exe -jar <jar-path>Executable.jar
In batch file, how I would retrieve the absolute path of the folder which has all these jar and jre? There is an answer on SO for the question : what is the current directory in batch file that suggests to use %~dp0
, but how would I use this in correct way for the command I mentioned above?