1. Ant installation and ant environment configuration
2, ' mode ', ' Explorer ' is not an internal or external command, nor a running program or batch file. Workaround.
3, java.lang.OutOfMemoryError:requested 487424 bytes for the card table Expans solution.
Install the JDK first, then configure your ant environment:
1, ant installation file download. Click here to download the zipped or http://ant.apache.org/bindownload.cgi download Zip package apache-ant-1.8.2-bin.zip.
2, decompression package. such as decompression to E:\ learning class \apache-ant-1.8.2,
3, configure environment variables. Create a new Ant_home variable in the system environment variable, the value is E:\ learning class \apache-ant-1.8.2. Add%ant_home%\bin to the path variable; If there is no path variable, the new one is created.
4, verify the ant environment configuration. Start--> run--> input cmd, open the DOS command window. Finally, at the command line, enter: Ant-version, if the version number is displayed, it represents the success of the ant environment configuration. Ant-help can view help information.
Issues that occurred while compiling the project:
1,
' Mode ' is not an internal or external command, it is not a running program or a batch file.
' Explorer ' is not an internal or external command, nor a running program or batch file.
Modify the path value in the environment variable, plus%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem at the front
2,
java.lang.OutOfMemoryError:requested 487424 bytes for card table Expans
Workaround 1:
<target name= "Compile" depends= "init" >
<javac srcdir= "${src}" destdir= "${dest}" debug= "true" fork= "true" memorymaximumsize= "512m" >
<classpath refid= "Project.class.path"/>
<classpath refid= "Jspc.class.path"/>
</javac>
</target>
Add fork= "true" memorymaximumsize= "512m" to the JAVAC option to add the memory at compile time
Workaround 2:
New java_opts in environment variable, value:-xms64m-xmx512
Workaround 3:
If you are using Eclipse development, when you build a Web project with Ant, you encounter Java.lang.OutOfMemoryError:Java heap space anomaly
window->preferences->java->installed Jres->edit JRE
Set the default VM arguments parameter to-xms64m-xmx512
Workaround 2 is a generic method, whether it is compiled directly with Ant or in eclipse.