I ran across a little tip tonight I thought I should share. Trying to perform a large XSLT tranform with Ant kept giving me the following error: Out of memory. Increase Heap Size.
This is a Java error indicating that the virtual machine is out of memory. So now I know what the problem is, what next? If I was launching from a command line changing the heap size is not that tough. Just look up the options for java and set a new value, but I’m using Ant. Looking at the Ant shell script or batch file was no help.
Well a bit of Googling turned up that Ant looks for an environment variable called ANT_OPTS which is use to set Java parameters. Just set the environment variable and off you go. So I added the following to increase the heap size:
export ANT_OPTS=-Xmx256m
That sets the maximum heap size to 256 Megabytes. It solved my problem as the XSLT transform topped out at about 220Meg. So if you ever need to increase the size of the Ant JVM, now you know how.
分享到:
相关推荐
由于需要使用ANT编译的代码比较多,特别是在第一次变异的时候,会出现OutOfMemory错误。并提示更改ANT_OPTS设定。
基于 Ant Design of Vue 实现的 Ant Design Pro 源码 安装依赖 npm install 开发模式运行 npm run serve 编译项目 npm run build
基于 Ant Design of Vue 实现的 Ant Design Pro
基于AntDesignofVue实现的AntDesignProVue版
ant ant ant antant ant ant antant ant ant ant
ant ant下载 ant配置ant ant下载 ant配置ant ant下载 ant配置
开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6...
ant 讲解ant 讲解ant 讲解ant 讲解ant 讲解ant 讲解ant 讲解ant 讲解ant 讲解ant 讲解ant 讲解ant 讲解ant 讲解ant 讲解ant 讲解ant 讲解
org.apache.tools.ant.Main org.apache.tools.ant.Task org.apache.tools.bzip2.CRC org.apache.tools.ant.Target org.apache.tools.ant.Project org.apache.tools.zip.ZipFile org.apache.tools.zip.ZipLong ...
ant配置ant配ant配置ant配置置
ant-designer-vue离线文档1.+版本
Ant Design vue v1.7.2 离线文档
NBCIO 亿事达企业管理平台,基于 Ant Design of Vue 实现的 Ant Design Pro Vue 版 nbcio-boot 的前端UI框架,采用前后端分离方案,提供强大代码生成器的低代码平台。 前端页面代码和后端功能代码一键生成,不需要写...
ANT文件详解 ant介绍 ANT 命令
ANT COLONY ANT COLONY ANT COLONY ANT COLONY ANT COLONY ANT COLONY ANT COLONY ANT COLONY ANT COLONY
Use the links below to download a source distribution of Ant from one of our mirrors. It is good practice to verify the integrity of the distribution files, especially if you are using one of our ...
Ant 资源 Ant 资源 Ant 资源 Ant 资源 Ant 资源 Ant 资源 Ant 资源
vue ant design的离线文档, 解压后打开目录 npm install 运行 npm start 启动 默认项目地址为 localhost:3000
Ant Design4.20.2版本离线版本文档,直接放到apache目录下进行配置即可进行离线访问