问题描述
我正在编写一个关于Java的应用程序,它正在抛出这个错误 Java.lang.OutOfMemory Java Heap Space JDeveloper
。我知道我可以在命令行中添加 java -Xmx512m
来解决问题。但是,我需要在JDeveloper上运行此应用程序。所以,我的问题是:
I am writing an application on Java and it is throwing this error Java.lang.OutOfMemory Java Heap Space JDeveloper
. I know that I can add java -Xmx512m
to the command line to solve the problem. However, I need to run this application on JDeveloper. So, my Question is:
如何增加JDveloper上堆的大小?
How to increase the size of the Heap on JDveloper?
谢谢,
Sami
Thank you,Sami
推荐答案
概述
JDeveloper可以解决的原因内存不足包括堆限制和大文件。
Overview
The reasons JDeveloper can run out of memory include heap limits and large files.
控制内存量的文件在启动时提供给JVM for JDeveloper,相对于 jdeveloper / ide / bin /
目录,包括:
Files that control the amount of memory afforded to the JVM for JDeveloper upon startup, relative to the jdeveloper/ide/bin/
directory, include:
- jdev.conf
- ide.conf
更新这些文件如下:
- 退出JDeveloper。
- 编辑
ide.conf
。 - 附加以下
- Quit JDeveloper.
- Edit
ide.conf
. - Append the following
AddVMOption -Xms256M
AddVMOption -Xmx1024M
jdev.conf
。对于堆大小,添加VMOption
。jdev.conf
.AddVMOption
for the "heap size."
AddVMOption -Xmx1024M
AddVMOption -XX:MaxPermSize=1024M
大文件
JDeveloper天真地尝试解析具有已知文件扩展名的文件,这些文件扩展名位于项目的根级目录中。足够大的文件(例如3GB XML文件)将导致问题。要解决此问题,请为大数据创建子目录并将文件移入其中。 JDeveloper不会尝试在任意子目录中查找资源。
Large Files
JDeveloper naïvely attempts to parse files having known file extensions that are located in the project's root level directory. A sufficiently large file, such as a 3GB XML file, will cause problems. To work around this issue, create a subdirectory for the large data and move the file into it. JDeveloper will not try to find resources in arbitrary subdirectories.
这篇关于Java.lang.OutOfMemory Java堆空间JDeveloper的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!