In a batch file I have the following code:
where /R "C:\Program Files (x86)\Java" java.exe
It returns a list of filepaths that contain the java executable application. How can I store the list into a variable?
For example, I was wondering if something will work like this:
set javapath=where /R "C:\Program Files (x86)\Java" java.exe
echo %javapath%
I was hoping it will return C:\Program Files (x86)\Java\jre7\bin\java.exe
but it isn't. Anyone has an answer?