Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1323
  • Last Modified:

Error: "Error occurred during initialization of VM"

I get the following error when I try to run at a time 5-10 java jobs in a batch. I run them in the following way:
I write a .bat files at runtime using a perl program

set classpath=<mypath>
java <Myclass>

and then execute the .bat files.

I get the following error:
Error occurred during initialization of VM
Unable to load ZIP library: E:\Program Files\JavaSoft\JRE\1.2\bin\zip.dll
0
sachinkas
Asked:
sachinkas
1 Solution
 
objectsCommented:
Does zip.dll exist at that location?
If not, then where is your JRE installed?

Also does your Java app run ok if you run it directly from the command line (as opposed to with the batch)?
0
 
sachinkasAuthor Commented:
Yes zip.dll does exist and my java app does work individually.
0
 
objectsCommented:
Does it exist at E:\Program Files\JavaSoft\JRE\1.2\bin\zip.dll
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jpk041897Commented:
What platform are you running on and how much memory (primay and secondary) do you have?

0
 
sachinkasAuthor Commented:
IT does exist at E:\.... The dll is there. This problem comes sometimes not always. When I run one java job at a time, this problem does not come at all. Is it some kind of threading issue, like many programs accessing the same dll at the same time and then there is some problem..
I am running on NT and there is plenty of memory. I am sure there is no memory issue.
0
 
stimpyjcatCommented:
It's possible that the error is not as explicit as it might be.  Since it says "unable to load", that might mean that it simply encountered an error when trying to open the file, and that might possibly be due to another process opening it at the same time (i.e. one of your other VM invocations).

Given that this happens sporadically, it points to a thread resource contention problem.  It might also be a bug in the VM opening the zip file r/w instead of read-only.  I don't know NT well enough to point out what the actual problem loading the file might be.

If the processes are sufficiently long-running, you might use some simple IPC (inter-process communication) to prevent any two from trying to load at once.  This might be as simple as having each invocation touch a file as soon as it starts up; that way, whatever you are using to launch each invocation can delete the file, launch the VM, then wait for the file to appear prior to repeating the process.

0
 
sachinkasAuthor Commented:
Sounds logical. I wish to give u 50 points for pointing this out. I will post one more dummy question for u to get those 50 points.
0
 
sudhakar_koundinyaCommented:


No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


--  points to stimpycat


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now