I have a Java application that produces an output which is stored in a myfile.txt
file using batch script. Now I would like to pass the absolute path of this myfile.txt
file to another java application as a command line argument.
So something like:
java -jar "path/to/jar/MyJar.jar" > myfile.txt
<Something to get and store absolute path of myfile.txt>
java -jar "path/to/jar/MyOtherJar.jar" <absolute path of myfile.txt>
Now I found this answer which states the use of %~dpnx1
but I can't understand how to apply this. Any suggestions?