“Failed to create Java virtual machine” caused by virus or machine is corrupted?

enter image description here

I am using a dual-core XP machine with 4 GB of memory installed (but only 2.5 GB reported by the OS due to a 32-bit fact). I have been actively modifying the old JAVA application for at least a month using the latest Eclipse (editing, building and running) and Ant (another way to create and run). In the Eclipse configuration and build.xml we have the following JVM parameters: -Xmx1024M -Xms1024M -Xmn384M . We have been using this configuration for many years.

I also have a batch file to run Eclipse with this option: -vmargs -Xmx768M . This batch file has been with me for many years. (Now I changed to modify eclipse.ini to complete the setup.)

The day before yesterday I discovered that it was much slower when I used Ant to build and run my application (I often build it and often launch it during the modification process). I restarted my car before I went home. That night I connected to my car to finish some changes (I am a very good employee.) And found it to be slower. The next morning, " failed to start the Java virtual machine " when I launch our application using Ant.

I restarted my car. Then I could not start Eclipse with the same error. I have to modify vmargs to require only 512 MB of memory to run Eclipse. Ant build time increased from about 20 seconds to about 6 minutes. And I need to reduce the maximum memory for the JVM to

 -Xmx512M -Xms512M 

in the startup configuration of Eclipse and Ant build.xml to avoid errors.

Then I uninstall my 1.6u24 jdk / jre and installed 1.6u25. I reinstalled Eclipse. Scanned the entire computer with Trend Micro and found nothing.

Another machine that I usually connect to to do some testing has a similar result (slower). All other machines, including my work machine and my laptop, work perfectly with the same application and tools.

If I use Ant to create and run it, the build and launch process is very slow. I created two batch files to compile and run the application. They work fine. When compiling with Eclipse, it works fine. But I can not ask the JVM to require 1024 MB for my application in all cases now.

All other actions on my machine seem normal. VisualStudio and C # applications work as usual. My machine was rebuilt a few weeks ago due to a hard disk failure. Thus, there are not many useless things to slow down my car.

Can anyone help me figure out why the JVM on my machine changed its behavior? Hope this is not caused by a virus. Do you know everything that I can try before I call IT to rebuild my car?

thanks,

+7
source share
4 answers

Although your configuration may not have changed, this does not mean that the amount of available memory has not changed. The memory is used by all programs in the operating system, so if another program has a slightly wider memory usage, you may not be able to pre-assign 1 GB of memory that you specified (from the command line arguments) should be available to run the JVM.

Another possibility is that some new program is installed / running, and it is hiding with the memory you need. Perhaps the virus scan has been installed / updated, and in itself it can be quite dangerous for memory (depending on the product).

Finally, you mentioned that the car was rebuilt. You might want to check (via BIOS) that you actually have as much physical memory as there was before recovery. Rebuild machines have a fun way of shaking memory sticks out of their sockets (or maybe there was more restructuring than meets the eye). The problem can be as simple as not enough memory to pre-bind to the JVM, because you start with less.

If all of this is verified, check for obscure things. If you reinstall a very old or different operating system, it may not support access to as much memory as possible. This usually happens when someone returns from a 64-bit installation to a 32-bit installation.

+6
source

Either use the task manager or process guide from Microsoft (http://technet.microsoft.com/en-us/sysinternals/bb896653) and check for memory pigs. If you need to reduce the amount of memory used, most likely this is due to the fact that something else occupied it. Also, I find that the 2.5 GB cap is a bit weird as I thought the cap looked more like 3.25 GB (mainly because this is what I have on my Windows XP with 4 GB installed )

Also, every time I saw this error message, this is because there is not enough physical memory to capture. I had to close programs in the past to run a few things after receiving this exception.

(I would put this in a comment, but have not yet received a rating: /)

+1
source

Do you see something strange in the task manager? CPU utilization? The fact that you cannot allocate as much memory as you are used to sounds strange, but I saw a similar decrease in compilation time after updating the antivirus on one of my development machines.

What happens if you disable antivirus during compilation?

0
source

It sounds more like a configuration problem than a virus, especially considering that it was recently rebuilt. You did not indicate whether you are using 32-bit or 64-bit Java. This can help find out which one they are trying to fulfill when it fails.

Other things to check: virtual memory settings; any application-specific settings in the OS; antivirus program settings; other processes (try running HijackThis and / or MSRT ).

0
source

All Articles