NetBeans 内存不足错误 [英] NetBeans Low on Memory Error

查看:34
本文介绍了NetBeans 内存不足错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 Netbeans 中的这种错误很陌生.我一直在使用我的 net bean 8.0.2 在 Java J2SE 中工作.我正在对字符串进行模糊搜索,通常字符串的长度为 300-500.我正在使用 Levenshtein 和 Jaro Winkler 算法来查找字符串之间的距离.大约需要 1500 次迭代才能找到字符串之间的距离!问题是我的网豆经常报错:

I am new to this kind of error in Netbeans. I have been working in Java J2SE using my net beans 8.0.2. I am doing Fuzzy Search on Strings usually strings having 300-500 length. I am using Levenshtein and Jaro Winkler Algorithms to find the Distance between the strings. There are about 1500 iterations to find the distance between the strings! The problem is that my net beans often gives error for:

Low on Memory, Error Unable to Compile

我在网上做了一些搜索来摆脱这个错误,并找到了如何通过添加来增加堆大小

I have done some search online to get rid of this error and found how to increase the heap size by adding

-Xms3G

command 的意思是给堆分配 3GB 的空间!但是在编译过程中还是出现了这个错误,项目在net bean中运行.

command means to give 3GB space for the heap! but the error still comes up in the compilation process and project run in net beans.

谁能帮我解决这个错误,因为当它发生时我得到了这个错误

Can somebody help me out how to get rid of this error because when it happen i got this error

 java.lang.noClassDefError

请帮我摆脱这个错误我是这个错误的新手!

Please help me getting rid of this error I am a newbie for this error!

推荐答案

对于我的问题,最简单的答案是识别技巧.我的工作目录中有许多 netbeans 项目.假设我的目录 D:NetBeansWorkSpace 包含大约 300 个项目!我所做的是简化目录将旧项目移动到新目录中,并且只有少数项目留在我的 netbeans 工作空间中.将多个项目移动到新目录后,错误消息消失.问题是当netbeans启动时,它会将项目加载到内存中,如果你有很多项目到加载目录中,它会导致内存泄漏!

The simplest answer for my problem was a trick to identify. I had a number of netbeans projects into my working directory. Suppose that my directory D:NetBeansWorkSpace contains about 300 projects! What I done is that simplify the directory moved the old projects into a new directory and only a few projects left into my netbeans working space. The error message goes off after moving a number of projects into a new directory. The thing is when netbeans starts up it loads the projects into the memory and if you have a lot of projects into the loading directory it will cause to leak the memory!

这篇关于NetBeans 内存不足错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆