Fix the "out of environment" error when setting a new CLASSPATH
DOS has a limit on available environment space. You can adjust this in CONFIG.SYS. If your SHELL statement is set to COMMAND.COM, simply add/modify the SHELL parameter for adjusting the environment size: SHELL=C:\windows\command.com C:\windows /p /E:4096
will set off 4 Kb for environment variables.
Command line in DOS has a limit of 127 characters. If you need more room to lanch the JVM then you have the following workaround.
Use environment variable like SET MYCLASSPATH = /files/classes/lib/examples.jar
SET MYARGS = -Djava.security.policy=/files/policy
java -cp %MYCLASSPATH% %MYARGS% myClass
已经设置了
SET JAVA_HOME=C:\jdk1.3.1\jdk1.3
set ANT_HOME=F:\ant\ANT
SET CLASSPATH=.;C:\jdk1.3.1\lib\dt.jar;C:\jdk1.3.1\lib\tools.jar;F:\ant\ANT\lib\ant.jar;F:\ant\ANT\lib\jaxp.jar;F:\ant\ANT\lib\crimson.jar;