Error: "Error occurred during initialization of VM"

Posted on 2001-07-06
Last Modified: 2007-12-19
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
Question by:sachinkas
LVL 92

Expert Comment

ID: 6260988
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)?

Author Comment

ID: 6262328
Yes zip.dll does exist and my java app does work individually.
LVL 92

Expert Comment

ID: 6263427
Does it exist at E:\Program Files\JavaSoft\JRE\1.2\bin\zip.dll

Expert Comment

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails


Author Comment

ID: 6264887
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.

Accepted Solution

stimpyjcat earned 100 total points
ID: 6272947
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.


Author Comment

ID: 6280675
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.
LVL 14

Expert Comment

ID: 8975031

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.
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.

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Receive file in Servlet 1 36
countHi challenge 25 84
groupSum6 challenge 6 45
Securing Jmx Console and web console 2 48
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now