使用JRockit作为Eclipse的Java VM

2009-3-13 
 
安装JRockit:
 
1. 从BEA下载最新的JRockit。 JRockit据说是Wintel平台下最快的Java编译器(以前还有IBM的JDK和Jike,IBM JDK现在是WebSphere的一部分,而最先支持增量编译的Jike已经贡献给Eclipse了,BEA也将会把JRockit贡献给 Eclipse。 天下归一啊)。 BEA的JRockit主页在这里,从这里下载最新的JRockit 5.0(我下载的是R26.4.0),大约75MB。
2. 安装JRockit非常容易,不停的”Next”即可。 安装完以后,可以把JAVA_HOME设置为JRockit(可选项)。
 
配置Eclipse:
 
1. Eclipse启动参数。 其实就是像前一篇所说的那样,在Eclipse启动参数里面修改-vm的值,使用JRockit来启动Eclipse。比如我修改为:
 
C:\Java\eclipse\eclipse.exe -vm C:\java\jrockit-R26.4.0-jdk1.5.0_06\ bin\javaw.exe -vmargs -Xms256m -Xmx512m -XXsetgc:singleparpar -XXcompactratio:1
 
2. 在Eclipse里面,安装JRockit,即在Installed JRE中添加JRockit,并设置为默认。 这样,就可以用JRockit来编译项目了。
 
至于性能:
Eclipse(我 的Eclipse是v3.2 Callisto,含所有的插件,以及Crystal Report, SWT Designer, PowerDesigner,Mylar, FindBugs等插件)启动的时候,比使用Sun JDK 1.5要快一些(但不是快很多很多,毕竟Sun JDK 1.5的性能已经提升了),大约能有10-15%的改进吧。 我的工程一共有95个plug-in项目和1个Web项目。
 
之后,我可能会尝试一下把JRockit用到Glassfish的服务器上,看看效果如何。
 
 
-----------------------------------
JavaGG 回答于 2009-03-13 11:11
举报
就怕我生成的classes放到服务器上有问题
现在我用6.0编译的放到5.0运行都会报错,说版本错误
有帮助(0) | 没帮助(0) | 评论(0) | 引用此评论
 
 
红薯 回答于 2009-03-13 11:26
举报
谁让你把classes也放到服务器上啊,服务器应该从版本控制库中获取代码现编译来用。
有帮助(0) | 没帮助(0) | 评论(0) | 引用此评论
 
 
Andy.Ren 回答于 2010-03-23 20:09
举报
恩,JRockit的性能是比SUN的JDK性能好一些,但是要看是SUN的哪一种产品了,如果是社区版的,确实是这样,如果是商用版的,那可就不一样了。可以参考一些商用软件,他们采用的JDK的性能要比我们下载的要好,而且你可以看一下OpenSolaris的JDK它的性能可是超级的棒!可以联系SUN买他们的商用版JDK
有帮助(0) | 没帮助(0) | 评论(0) | 引用此评论
 
 
benbenming 回答于 2010-03-23 21:45
举报
JRockit现在已经是oracle的产品了。不再单独提供下载了。可在oracle提供的内存检测工具中找到。
试试效果还是不错的。但是还是没有在正式项目中使用。
 
********************************
关于eclipsec.exe
eclipse 3.3提供了eclipsec.exe,直接用控制台启动eclipse,将输出直接打到控制台.但是我通过eclipsec启动eclipse却没有获得相应的效果,打印信息没有出现在控制台上.具体情况如下:
 
我通过控制台启动eclipse,命令如下:
E:\dev\eclipse\eclipsec.exe -debug
控制台打印一些信息,如:
Start VM: C:\WINDOWS\system32\javaw.exe
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx256m
-jar E:\dev\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
-os win32
-ws win32
-arch x86
-showsplash
-launcher E:\dev\eclipse\eclipsec.exe
-name Eclipsec
--launcher.library E:\dev\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.3.R33x_v20080118\eclipse_1023.dll
-startup E:\dev\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
...
然后我在eclipse中新建一个简单工程,新建一个简单类,在该类main方法中添加,System.out.println("hello world");和System.err.println("err world");结果eclipse工作区的控制台中都打印出了信息,但是在启动eclipse 的控制台中没有任何信息.
 
另外,我关闭eclipse后,eclipsec进程退出.但是我关闭eclipsec进程,eclipse却没有退出,仍然正常工作,
 
请问这是eclipsec.exe的的bug吗?还是我的理解有误?
***********************************************************
以下是相关资料
 
There is now a second launcher "eclipsec.exe" on Windows that behaves as expected for a console application. This allows piping the output from Eclipse, as well as better behavior in general for the standard -console, -consoleLog and -debug options.
 
The result is that on windows we are now shipping a second executable: eclipsec.exe.  eclipse/eclipsec is analogous to javaw/java.  Eclipsec.exe is linked as a console application so that the OS will allocate a console for us.  This executable does not automatically add any arguments, so you still need to specify -console, -consoleLog, etc. 
 
>>>>> If you are using 3.3, try the eclipsec.exe launcher instead.  It is 
>>>>> linked as a console application and works much better.  Note that the 
>>>>> export will not include this executable by default and you would need 
>>>>> to set up a headless build, or include it manually.  (It can be found 
>>>>> in the root of the windows install, or in the 
>>>>> org.eclipes.equinox.executable from the delta pack)
 
 
回复于: 2008-09-24 15:35:11
引用楼主 crazycowliu 的帖子:
另外,我关闭eclipse后,eclipsec进程退出.但是我关闭eclipsec进程,eclipse却没有退出,仍然正常工作, 
 
在command line(cmd.exe)调用eclipsec,eclipsec加载eclipse GUI app,这时共启动了2个进程,一个是cmd.exe,另一个是eclipsec.exe(此进程中加载了2个service,一个console和一个GUI);当你关闭eclipse GUI app,那么eclipsec.exe也会随之关闭;而你所谓的“关闭eclipsec进程”,是关闭的哪一个?我猜测你是关闭的cmd.exe进程,那么eclipse GUI app当然不会退出,因为eclipse GUI app不是在cmd.exe进程中加载的,而是在eclipsec.exe进程中加载的。
 
posted @ 2012-11-01 17:57  linux,dev  阅读(250)  评论(0编辑  收藏  举报