Submitted On 30-JAN-2007
daniel_hagg
The problem will be solved if you stop using the /MD switch.
Submitted On 28-FEB-2007
jbisotti
Why doesn't the JRE redistribute msvcr71.dll, per MS's suggestion?
Submitted On 13-JUN-2007
kieron.wilkinson
jbisotti: It does. This only happens if you are using a custom launcher, i.e. not using java/w.exe
Submitted On 21-JUN-2007
unsound
I think this is _really_ serious. It makes open source development of Java launcher applications impossible, as the .dll file can not be freely redistributed. (And it probably violates a lot of licenses too)
You may say it's not a bug, but I really think that's very ignorant, as it decreases the number of programmers that can use the jvm.dll to launch their Java apps to the ones that also have a license for Visual Studio...
Submitted On 17-OCT-2007
For a discussion of this problem and solutions:
http://www.duckware.com/tech/java6msvcr71.html
An evaluation of "Unfortunately there's nothing we can do in jvm.dll to work around this". Of course there is. Follow daniel_hagg and don't use /MD. Plus other solutions are possible. We would like a solution, not excuses.
kieron.wilkinson: It only happens with custom launchers and not java/w.exe because Sun's does not follow their own advice in this report.
The evaluation points to the "new Microsoft new C runtime distribution model" and then Sun doesn't follow it for their own java/w.exe. Interesting.
Submitted On 13-NOV-2007
Wow, this is terrible. Nuff said.
Submitted On 21-APR-2008
d.bonvillain
"and then Sun doesn't follow it for their own java/w.exe"
We should fill another bug to prevent SUN from polluting Windows with their executables, this is bad policy to do that, SUN should read MSDN not only to discard real bugs...
Submitted On 28-AUG-2008
pbannister
Um, no ... this is wrong.
You should not make random changes to the JVM invocation API between versions. It is bad enough that the disk location of the DLL changes between versions, but adding fixed dependencies on DLLs not guaranteed to be in the PATH is nuts.
Copying msvcr71.dll into the application directory (or the Windows directories in the PATH), modifying the PATH, , or programmatically pre-loading any version-specific random dependencies - these are all quite ugly hacks.
I can understand how the Java developers at Sun missed this problem, as there is a very high probability that some other application (not following best-practices on Windows) as already copied msvcr71.dll into Windows\System32 and is then in the PATH. This is still a mistake.
The solution is simple - statically link the C runtime into JVM.DLL. There just is not a good reason to use the C runtime in a DLL. (There was a very good reason back in the Win16 days ... but those days are long gone.)
BTW, this is the same problem and solution for distributing COM components. Nothing new here in either the problem or the solution.
Submitted On 28-NOV-2008
runiter
Is anybody from Sun listening to this? I'm getting complains from my customers. There are too many of them to redistribute my the .dll to.
Submitted On 21-SEP-2009
cowwoc
On the one hand, breaking backwards compatibility in this way is annoying. On the other hand, Visual Studio 2005 and up push hard towards this distribution model. msvcrt80.dll and msvcrt90.dll are not copied into c:\windows\system32 as was done for Visual Studio 2003 and msvcrt71.dll.
In short: as annoying as this break was, Sun is actually right about this one. They will be forced to upgrade to newer versions of Visual Studio in the near future and static linking isn't really an option because they've got over 80 programs linking to msvcrt. The size impact would be huge.
I recommend everyone bundles "shared assemblies" with their application installers as described here: http://cowwoc.blogspot.com/2008/09/fixing-visual-studio-run-time-error.html
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|