How to set the environment variables for Java in Windows (the classpath)?
In programming context you can execute SET command (SET classpath=c:\java) or Right click on your computer > properties > advanced > environment variables.
In a batch file you can use
SET classpath=c:\java java c:\myapplication.class