Created On:  24 October 2012

Problem:

The following error was encountered whenever customer starts the VISUAL COBOL for Eclipse in Windows:

Failed to load the JNI shared library “c:\Program Files\Java\jdk1.7.0._03\bin\..\jre\bin\server\jvm.dll”

Customer previously installed the 64-bit version of Java J2EE IDE for Eclipse and the latest 64 bit Java SDK on a Windows 7 64 bit machine. He is able to start the Java IDE for Eclipse but not the Visual COBOL product.

Resolution:

This is an issue on the Eclipse IDE and it is due to 32/64 bit compatibility between the java virtual machine installed on the customer’s machine and the version of Eclipse.  The Eclipse version shipped with Visual COBOL is running in 32 bit and customer has 64 bit JDK. As seen in the error displayed, Eclipse in 32-bit is trying to execute the program in a 64-bit java installation.
 
The fix for this Eclipse issue is taken from this link: http://wiki.eclipse.org/Eclipse.ini
 
In summary, the steps are:
1.   Check the installed java JRE or JDK and look for a 32-bit version.  Visual COBOL for Eclipse is shipped with a 32-bit JRE. As a default,  the JRE is installed in C:\Program Files (x86)\Java\jre6. Locate the file javaw.exe installed with a 32-bit JRE or JDK. Example is the C:\Program Files (x86)\Java\jre6\bin\javaw.exe shipped with the Visual COBOL installer.
2.   Check the location of the eclipse.exe in the shortcut for Visual COBOL for Eclipse. The default is "C:\Users\Public\Micro Focus\Visual COBOL\eclipse\eclipse.exe"
3.   Find the eclipse.ini in the same directory where the Visual COBOL eclipse executable is located. 
4.   Edit the eclipse.ini by following the instructions in http://wiki.eclipse.org/Eclipse.ini.  To summarize the instructions in this link:
a.      Open eclipse.ini in a text editor
b.      Insert a –vm tag
c.      On the next line, enter the location of the javaw.exe to be used.
d.      Save eclipse.ini and re-start Visual COBOL.

Example –vm entry on the eclipse.ini using the JRE shipped with Visual COBOL:
-vm
C:\Program Files (x86)\Java\jre6\bin\javaw.exe 
 
        The exact path of the javaw.exe is different from installation to installation

 

Incident #2594869