由于xp操作系统用了很久,ghost恢复了一下,裸机上索性全部安装最新的,将jdk升级到最新版本的jdk6u21,随机启动eclipse,发现打开文件特别卡,然后eclipse直接关闭,当写代码自动提示时,卡,eclipse很不礼貌的关闭,没任何提示,这个版本的eclipse用了很久,所以怀疑新装jdk的问题,反复测试发现了一个弹出框,有PermGen字眼,然后google索索,找到一片文章解决了我的问题,特别翻译出来,以备后来人!
If you recently upgraded to JDK 6 update 21 on Windows
and are noticing lots of Eclipse problems,
如果最近将jdk升级到jdk6u21(windows用户),那么eclipse会出现很多问题
I probably know why (and can show you how to fix it).
First, some background. The HotSpot VM (Sun’s implementation)
has a concept known as the Permanent Generation,
or PermGen for short. Its main purpose is to confound users and it is rumored
to be going away in future releases of HotSpot.
首先,了解一些背景知识,HotSpot VM(sun的实现)有一个永生代的概念(缩写PermGen),
它的主要目的是to confound users (不知如何翻译),听说将在以后的HotSpot版本中移除
By default, the VM allocates 64 MB for the PermGen space, which is often enough.
However, Eclipse installations with a lot of plugins tend to need a lot more.
默认,虚拟机给永生代分配64M的内存空间,通常是足够的,
然而,eclipse安装了太多的插件,需要更多的内存
Because Eclipse is meant to work on multiple JVMs,
the stock eclipse.ini doesn’t directly set the PermGen size,
it has a line that looks like this:
由于Eclipse有意工作在多虚拟机下,配置文件eclipse.ini不能直接设置PermGen的大小,文件中有如下一行:
–launcher.XXMaxPermSize
256m
That will tell the Eclipse launcher to set the perm size,
if it is running on the HotSpot VM. Unfortunately,
it appears this quit working with update 21
– a quick check with VisualVM showed that this flag wasn’t working
这个配置告诉eclipse启动器,如果在 HotSpot VM上运行的话, 设置PermGen 大小,遗憾的是,
它似乎在jdku21版本中不工作了!
and no matter what you set it to, your VM would have only 64MB of PermGen space.
虽然你设置了,但是虚拟机仍然只有64M的PermGen空间
It appears that the cause of this is that with update 21,
the vendor flag was changed to Oracle, which broke Eclipse’s VM detection code.
Thus, the flag is never being passed through to the VM.
It appears as though this only happens on Windows and only
when running the Sun (sorry, I’ll never call it Oracle) JVM.
Fortunately, it is easy to fix. Simply add this flag to the
-vmargs section of your eclipse.ini (it should be at or near the bottom):
幸运的是,这个问题非常容易的就解决了,在配置文件eclipse.ini的-vmargs部分简单的添加如下标志
(添加在最下面或者最下的附近位置)
-XX:MaxPermSize=256M
That will directly set the PermGen size
and should fix any PermGen errors you were running into.
此标记将直接设置PermGen的大小,解决运行时PermGen的错误
Who knows what else changing the vendor flag broke?
分享到:
相关推荐
java.lang.OutOfMemoryError: PermGen space 解决方案
JDK 6 TOMCAT 6 Eclipse 3.3 Myeclipse 6.07.0 安装档说明
jdk+tomcat+Eclipse(JAVA环境开发配置)里面收集了几种,都可供参考,我开始配置环境也用了很长时间,需要静下心来,慢慢来!
JDK 6 update 10 ( windows ) 总计72.9M,因为上传文件限制为15M,所以用rar分成了5个部分。
JDK 6 update 10 ( windows ) 总计72.9M,因为上传文件限制为15M,所以用rar分成了5个部分。
eclipse开发工具jdk1.8补丁 将 Javacompiler1.8放在eclipse开发工具的plugins下,打开eclipse菜单-help-install new software-add-archive。
一般不推荐下载最新版jdk,大家想,新出来的事物,都会有一个测试期有些功能不怎么稳定,而jdk1.8要稍微稳定些,所以在学校里面老师都一般让我们下载jdk1.8。有些时候我们去国外的官网上下载东西,不仅要克服英文...
eclipse64位开发工具,带JDK1.8,自己安装,无任何问题,Eclipse Java EE IDE for Web Developers. Version: 2018-09 (4.9.0) Build id: 20180917-1800 OS: Windows 10, v.10.0, x86_64 / win32 Java version: 1.8.0_...
eclipse+jdk1.8
Java 学习笔记 开发环境搭建JDK+Tomcat+Eclipse
在用Eclipse+JDK+Tomact5.5开发遇到的问题
解决eclipse4.3kepler工程里的compiler和Project facets没有1.8的问题,支持jdk1.8补的补丁。安装:eclipse菜单-help-install new software-add-archive。安装时不要勾选contact all update sites during install to...
包含目前所有JDK支持的操作系统的安装包...
eclipse-jee-2020-06-R-win32-x86_64 最后一版支持JDK1.8的eclipse
详细的Java安装配置,包括JDK,Tomcat,Eclipse 的环境配置。还有Web项目的发布。
Eclipse+jdk安装包;Eclipse+jdk安装包;Eclipse+jdk安装包
JDK(Java Development Kit)是Sun Microsystems针对Java开发员的产品。自从Java推出以来,JDK已经成为使用最广泛的Java SDK。JDK 是整个Java的核心,包括了Java运行环境、Java工具和Java基础类库。JDK是学好Java的...
eclipse的版本是note3,加上jdk1.8配合使用以完成项目开发
m2e 适合 eclipse3.X jdk1.6 (maven2eclipse)
JEE版eclipse带jdk1.6JEE版eclipse带jdk1.6JEE版eclipse带jdk1.6JEE版eclipse带jdk1.6