今天安装Artifactory的时候,报出以下错误
Error occured during initialization of VM
Could not reserve enough space for 2097152KB object heap
开始以为是D盘空间不足,删了4个G之后,还是报同样的错误,google了一下找到了解决方案
stackoverflow.com/questions/4…
方案如下:
here is how to fix it:
Go to Start->Control Panel->System->Advanced(tab)->Environment Variables->System
Variables->New: Variable name:
_JAVA_OPTIONS
Variable value:-Xmx512M
Variable name:Path
Variable value:%PATH%;C:\Program Files\Java\jre6\bin;F:\JDK\bin;
Change this to your appropriate path.
其中第一个参数很好改,第二个参数 Path 后面的那一大串值
C:\Program Files\Java\jre6\bin;F:\JDK\bin;
这个其实是jdk的路径,比如我的是
也就是 D:\JAVA\jdk1.8.0_65 设置好就行了