I'm using a DOS command to run a program (not written in java). How can I use another DOS command to retrieve the value of a string inside a class file.

Inside the class file I have:

Code:
public static String thestring = "string value.";
How can I use a dos command to echo that string.

Code:
echo &thestring%