I am trying to create a Windows batch script that will store the outputs of this command in a variable.
java -XshowSettings:properties 2>&1 | findstr "user.dir"
Output is something like this
user.dir = C:\Program Files (x86)\Java\jre1.8.0_291\bin
I want the following portion C:\Program Files (x86)\Java\jre1.8.0_291\bin to store in a variable in my script.
I've tried using for loop but its not performing the findStr command.
Any assistance would be greatly appreciated.