Search code examples
windowsjvmruntime.execjvm-crash

Is it possible to configure a JVM on Windows to not load msvcr100.dll?


msvcr100.dll (Visual C++ Runtime) seems to have become part of the Java runtime on Windows after Java 1.6, and I'm thinking if Java ran on Windows all these years without it, why is it now I must put up with it, or can I configure it out of the picture.

I have a program that has a mysterious very occasional crash of msvcr100.dll. I noticed that I can rename msvcr100.dll after my Java program has started (so the dll is not loaded), but when I call Runtime.exec to spawn a Windows program, the missing DLL is "noticed" again, and gives the message "The specified module could not be found. Java Runtime Environment not valid."

In earlier versions of Java, this dll was not required, so my question: is there a way to tell the JVM that we don't want to use msvcr100.dll?


Solution

  • No, it is not possible. Oracle's Java runtime is written in C, and built with Visual Studio 2010, so it needs the Visual Studio 2010 C runtime library, msvcr100.dll.

    Java 6 used the Visual Studio 6 runtime library, msvcrt.dll, instead.

    The runtimes are not interchangeable. An application built for one runtime cannot use a different one. In any case, the runtime is unlikely to be the source of your problem.