Exception: “You need to install the Visual C++ runtime library”
In Java-to-.NET projects, you get the following exception message:
Couldn’t start up .NET side. Please verify that the files jnbshare.dll, jnbsharedmem.dll, and jnbjavaentry2.dll are in the GAC or are in the folder pointed to by the dotNetSide.appBase property. If that is the case, then you need to install the Visual C/C++ 9.0, 10.0, or 11.0 runtime library. In order to use shared memory communications, this JNBridge product requires that the Visual C/C++ 9.0, 10.0, or 11.0 runtime be installed. You can download a copy from https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
The shared memory communications mechanism references the Visual C++ runtime library, and the C++ runtime library of the appropriate version and bitness must be installed on the machine. In most cases, this library is already installed by some other product — often a Microsoft product. If the machine is relatively new and clean, the library will be missing, and you will see this error.
You can download the appropriate Visual C++ runtime library from Microsoft here.
If your application targets .NET Framework 2.0, 3.0, or 3.5, download and install version 9.0 of the Visual C++ (VC++) runtime library, associated with Visual Studio 2008. If your application targets .NET Framework 4.0, 4.5, 4.6, or 4.7, download and install version 10.0 of the VC++ runtime library, associated with Visual Studio 2010. In some cases, this is not sufficient to resolve the problem, and you should install version 11.0 of the VC++ runtime library, associated with Visual Studio 2012. In all cases, download the library of the appropriate bitness: if your application runs in a 32-bit process, download the 32-bit (x86) version; if your application runs in a 64-bit process, download the 64-bit (x64) version. In all cases, you can download the library from the link given above.