參考文章:https://answers.atlassian.com/questions/9397/not-enough-heap-space-to-run-fisheye
fisheye下載好了之后,解壓后怎么運行run.bat都報錯誤,錯誤提示如下:
D:\developsoft\fisheye-3.1.5\fecru-3.1.5>bin\run.bat --debug
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
請按任意鍵繼續. . .
網上搜索了很久,最后試了很多,終於找到解決方法了!哈哈!
在 控制面板\系統和安全\系統--->高級系統設置----》系統屬性-----》高級----》環境變量-----》系統變量----》新建
變量名:FISHEYE_OPTS
變量值:-Xms128m -Xmx512m -XX:MaxPermSize=256m
再點擊確定--》確定
即可。
原因分析:我的電腦4g內存,win7(32位),jdk 1.7(32位),因為是32位的系統,所以原則上4G內存只能讀2G左右,但是fisheye默認值為
RAM |
1GB minimum, 2GB will provide performance "headroom". Your Java heap should be sized at 512MB with theFISHEYE_OPTS environment variable, adjustable up to 1024MB depending on performance. |
它是建議最好1G以上,2G為推薦值,但是jdk默認值最好關於fisheye的預留值要512M以上,如果你的內存沒有那么大,那么手動把MaxPermSize調小即可。
重新雙擊run.bat,然后在瀏覽器中輸入localhost:8060即可打開fisheye,fisheye的默認端口為8060