|I want to save the output of a java program to an environment variable, such as:|
set RESULTVAR='java javaprogram'
The java javaprogram lists an integer value on the line when running, and I want that output to be stored in RESULTVAR, such as:
> java javaprogram
I want to save this value in an environment variable.
If that is not possible that easily, is it possible to receive yesterday's day in a .bat file, e.g. if today is the 18th that the command returns value 17. Or if today it's March the 1st you will get 28 or 29 depending on the year? (Actually this is what my Java-program is doing...)
Thanks for your help!