November 1st, 2004, 03:32 PM
Could not load the Java Virtual Machine
My PC is on a Win XP platorm. I have a program that I would like to open through a batch file, dos, or a VB app. If I attempt to open this program through any of the above methods, I receive an error that says "Could not load the Java Virtual Machine. Please verify that the application is installed correctly and try again."
If I use a windows shortcut, open it from the start menu, or double click the exe in explorer the program opens fine.
When attempting to open in VB I use this line.
Shell "C:\Progra~1\Direct\Direct.exe", vbNormalFocus
Seems like this should be fine. Is there another method to open this that would simulate opening through windows?
Any and all help will be appreciated on this.
November 1st, 2004, 06:34 PM
Re: Could not load the Java Virtual Machine
I'd check the shortcut properties and see how it is being opened that way, since that works. The ShellExecute API can open it the same way (that's what happens when you click a shortcut anyway). I don't know if Shell will operate differently.
The only other thing that comes to mind is that since m$ got sued for stealing Java from Sun, they apparently don't include anything for it in xp, not even the one from Sun. Obviously you have something installed for it or it would never work, but is it Sun Java, or the m$ vm? I can't say if it would make any difference, but I wouldn't be surprized.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!