What are “%1” and “%2” in batch files?

It represents the first command line argument passed to the batch file.
If you run your batch file with:

myfile.bat firstArg secondArg

%1 becomes “firstArg” and %2 becomes “secondArg”
The related shift command shifts the position of arguments one to the left. Running shift once in a batch file will make “%1” value to be the second argument, “%2” becomes the third, and so on. It’s useful for processing command line arguments in a loop in the batch file.

http://stackoverflow.com/questions/2309968/what-are-1-and-2-in-batch-files

How to run this java class in command line in windows?

You would run

java com.test01.test01

but having a class with the same name as a package is a really bad idea (as well as not following the Java naming conventions).
You’d need to run it with the relevant class on the classpath. For example, you could just compile it like this (from the “root” of your source tree):

javac -d . [path to source file]
java com
.test01.test01

or if you’ve got your source organized appropriately already:

javac com\test01\test01.java
java com
.test01.test01
 
http://stackoverflow.com/questions/6314648/how-to-run-this-java-class-in-command-line-in-windows

Changing current version of Java within Windows

In the command shell:

set JAVA_HOME=C:\jdk1.6.0u24
set PATH=%JAVA_HOME%\bin;%PATH%

That will temporarily set up the environment in the command shell. Maven, Ant, etc. will pick up on your new version of Java without having to go to the Control Panel repeatedly.
Tools like Eclipse should be able to select which JDK to use in their own configuration tools for use within their environments.

http://superuser.com/questions/262757/changing-current-version-of-java-within-windows