CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Oct 2003
    Location
    Bradley, IL
    Posts
    116

    Could not load the Java Virtual Machine

    Hello Gurus,

    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.

    Thanks,
    Solturus

  2. #2
    Join Date
    Dec 2001
    Posts
    6,332

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured