Bug 405824 - When loading jvm.dll, xs.exe should find msvcr71.dll in jre/bin
Summary: When loading jvm.dll, xs.exe should find msvcr71.dll in jre/bin
Status: CLOSED FIXED
Alias: None
Product: RTSC (ARCHIVED)
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Sasha Slijepcevic CLA
QA Contact:
URL:
Whiteboard: target:3.25.01
Keywords: readme
Depends on:
Blocks:
 
Reported: 2013-04-16 16:01 EDT by Sasha Slijepcevic CLA
Modified: 2013-06-25 15:03 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sasha Slijepcevic CLA 2013-04-16 16:01:42 EDT
Microsoft recommends that C runtime libraries shouldn't be in the system directory http://support.microsoft.com/kb/326922. JRE shipps with msvcr DLLs in jre/bin, but xs.exe is not finding them there because that directory is not in the path. Before calling LoadLibrary, xs.exe should add jre/bin to the search path.
Comment 2 Sasha Slijepcevic CLA 2013-05-07 21:48:08 EDT
Until we fix this one, it should be reported in release notes of each XDCtools release.
Comment 3 Sasha Slijepcevic CLA 2013-05-28 17:29:41 EDT
- fixed in xdcutils-h17
I fixed the bug using SetEnvironmentVariable(PATH) and GetEnvironmentVariable(PATH) only. There is much richer API in newer versions of Win32 API specifically targeted towards DLL importting, but we can't use it as long as we are compiling for the version 12.00 of the Microsoft compiler.
Comment 4 Vikram Adiga CLA 2013-06-05 19:00:07 EDT
Verification:

I removed msvcr71.dll from C:\Windows\SysWOW64, removed all directories from system path,and ran xdcprod 3.24.07.73 and 3.25.01.61_eng. The results were as expected - xdcprod 3.24 failed and xdcprod 3.25 worked.

Output:

C:\>set path=

C:\><path>\xdctools_3_24_07_73\Windows\xs.exe -i
<path>\xdctools_3_24_07_73\Windows\xs.exe: error: can't create session manager: create of JVM failed

C:\><path>\xdctools_3_25_01_61_eng\Windows\xs.exe -i
js>

Verification successful for xdc product 3.25.01.61