问题描述
我使用安装了双核心的 XP计算机 4GB内存(仅 2.5GB 由OS报道,由于32位的事实)。我积极通过介绍最新的的Eclipse (编辑,构建和运行)和蚂蚁(另一种方式来构建和运行);修改旧的JAVA应用程序,至少一个月。在的Eclipse 运行配置和的build.xml 文件中,我们有以下JVM参数: -Xmx1024M -Xms1024m -Xmn384M
。我们已经使用了多年这种配置。
I am using a dual core XP machine with 4GB memory installed (but only 2.5GB reported by the OS due to the 32bit fact). I am actively modifing an old JAVA application for at least a month by using lastest Eclipse (edit, build and run) and Ant (another way to build and run). In the Eclipse run configuration and build.xml file, we have the following JVM parameters: -Xmx1024M -Xms1024M -Xmn384M
. We have been using this configuration for years.
我也有一个批处理文件来用这个参数启动Eclipse: -vmargs -Xmx768M
。该批处理文件已经跟我多年。 (我现在改为修改的eclipse.ini做配置。)
I also have a batch file to launch Eclipse with this parameter: -vmargs -Xmx768M
. This batch file has been with me for years. (now I changed to modify the eclipse.ini to do configuration.)
前天,我发现这是当我用Ant来构建和运行我的应用程序(我建立和修改过程中过程中经常运行)慢得多。我重新启动我的机器就在我回家了。那天晚上,我VPN来我的机器来完成一些修改(我是一个很不错的员工。),并发现了更多更慢。第二天早上,无法在了解创建Java虚拟机开始时,我运行我们使用Ant的应用程序的情况发生。
The day before yesterday, I found it was much slower when I used Ant to build and run my application (I build and run it frequently during the modification process). I restarted my machine just before I went home. That night I VPN to my machine to finish some modifications (I am a very good employee.) and found more slower. Next morning, "could not craete the Java Virtual Machine" started to happen when I run our application with Ant.
我重新启动我的机器。然后,我无法启动与我同样的错误的Eclipse。我必须改变vmargs权利要求只有512MB内存来启动Eclipse的。建造时间用Ant约20秒增加到大约6分钟。我不得不减少对JVM最大内存
I restarted my machine. Then I couldn't start my Eclipse with the same error. I have to change the vmargs to claim only 512MB memory to launch the Eclipse. The build time with Ant increased from about 20 seconds to about 6 minutes. And I have to decrease the max memory for JVM to
-Xmx512M -Xms512M
在这两个Eclipse在以避免错误运行配置和Ant build.xml文件。
in both Eclipse run configuration and Ant build.xml in order to avoid error.
然后我卸载我1.6u24 JDK / JRE和安装1.6u25。我重新安装了Eclipse。与趋势科技扫描整个机器和一无所获。
Then I uninstall my 1.6u24 jdk/jre and installed the 1.6u25. I reinstalled the Eclipse. Scanned the entire machine with Trend Micro and found nothing.
我通常连接到做一些测试另外该机也有类似的结果(慢)。所有其它的机器,包括我的同事的机器和我的笔记本电脑,做工精细用相同的应用程序和工具。
Another machine which I usually connect to do some testing has similar result (slower). All other machines, include my co-worker's machine and my laptop, work fine with the same application and tools.
如果我使用Ant构建和运行它,构建过程和启动过程是缓慢的extramely。我创建了两个批处理文件来编译并启动我的申请。他们正常工作。当使用Eclipse编译,它工作正常。但我不能让JVM声称 1024MB 我现在在所有情况下的应用程序。
If I use Ant to build and run it, the build process and launch process are extramely slow. I have created two batch files to compile and launch my application . They work as normal. When compile with Eclipse, it works as normal. But I cannot ask JVM to claim 1024MB for my application in all cases now.
在我的机器上的所有其他活动似乎正常。 VisualStudio中和C#应用程序照常工作。我的机器是由于硬盘故障重建几个星期前。因此,有没有很多没用的东西放慢我的机器了。
All other activities on my machine seem normal. VisualStudio and C# application work as usual. My machine was rebuilt few weeks ago due to hard disk failure. So there are no many useless things to slow my machine down.
任何人都可以帮助我弄清楚,为什么我的机器在JVM上改变它的行为?我希望它不是由病毒引起的。你知道什么,我可以尝试之前,我把它重建我的机器?
Anybody can help me figure out why the JVM on my machine changed its behaviour? I hope it is not caused by virus. Do you know anything I can try before I call IT to rebuild my machine?
感谢,
推荐答案
当你的配置可能不会改变,这并不意味着可用内存量并没有改变。内存是由操作系统的所有程序使用,因此,如果另一个程序有一个稍大的内存使用,它可能无法为pre-分配你表示存储器(命令行参数)1GB的必须可用来启动JVM。
While your configuration might not have changed, that doesn't mean that the amount of available memory hasn't changed. Memory is used by all programs in the operating system, so if another program has a slightly larger use of memory, it might not be possible to pre-assign the 1GB of memory you indicated (from the command line arguments) must be available to start the JVM.
另一种可能性是,一些新的程序安装/运行,它与你所需要的内存潜逃。病毒扫描可能已经安装/更新,并且单独它可以是相当的存储器猪(取决于产物)。
Another possibility is that some new program is installed / running, and it is absconding with the memory you need. Virus scanning might have been installed / updated, and it alone can be quite a memory hog (depending on the product).
最后,你提到的是,该机被重建。您可能需要验证(通过BIOS),你居然有前重建你有物理内存量相同。重建机有不和谐的记忆棒了他们的插座的一种有趣的方式(或者可能有更多的重建正在进行比满足眼睛)。因为没有足够的内存来pre-分配到JVM,因为你开始用更少的问题可能是那样简单。
Finally, you mentioned that the machine was rebuilt. You might want to verify (via BIOS) that you actually have the same amount of physical memory you had prior to the rebuild. Rebuilding machines has a funny way of jarring memory sticks out of their sockets (or perhaps there was more rebuilding going on than meets the eye). The issue could be as simple as there's not enough memory to pre-assign to the JVM because you are starting with less.
如果所有这些检查出来,检查晦涩的东西。如果您重新安装一个非常旧的或不同的操作系统,只要安装它可能不支持访问尽可能多的内存。这时候有人从64位安装恢复到一个32位的安装通常发生。
If all of that checks out, check the obscure stuff. If you reinstalled a very old or different operating system, it might not support accessing as much memory as is installed. This commonly occurs when someone is reverted from a 64 bit installation down to a 32 bit installation.
这篇关于"无法创建Java虚拟机"由病毒引起或机器搞砸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!