2

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?

Dale
  • 5,520
  • 4
  • 43
  • 79

1 Answers1

3

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.

Harry Johnston
  • 35,639
  • 6
  • 68
  • 158
  • Good detail. Thanks. msvcr100.dll is generating the fault and my Java program, packaged as an exe by Jar2Exe is where the buck stops. The BEX error is referenced here: https://www.silicondust.com/forum/viewtopic.php?f=16&t=22061#p146676 – Dale Sep 10 '15 at 03:17
  • What is `CwHelper.exe` ? Is that your Jar2Exe'd program? – Harry Johnston Sep 10 '15 at 04:12
  • Yes, CwHelper is the Jar2Exe'd program. – Dale Sep 24 '15 at 02:09
  • 1
    Pretty much has to be a bug either in the Java runtime or in jar2exe, though it's hard to say much more without examining the problem in a debugger. I suppose your code could be responsible if it calls the Windows API or third-party DLLs directly. – Harry Johnston Sep 24 '15 at 02:41
  • (The exception code indicates that a runtime library function was called with an invalid parameter.) – Harry Johnston Sep 24 '15 at 02:41