Sun JAVA (JRE) Running on Multiple (Dual) Core CPU Makes Forms Freeze
PRELIMINARY
While Sun Java (JRE) running on Dual Core Processor was causing forms hanging. Oracle Development team is investigating this in an unpublished bug but there have not been given any estimation on the resolution. So as workaround we are forcing Java executable to run on single CPU by using Khameleon automated utility.
The Khameleon utilities can be downloaded from the URL:
ftp://ftp.khameleonsoftware.com/Utilities/image.zip
You need a user name and password to connect to our ftp site, ask for it to Khameleon Consulting or Support services.
This utility will work in pretty much any modern Windows operating system (2000/XP/Vista/7) and it is meant to be used on computers with multiple CPUs, multiple cores, or Hyper Threading.
PROCEDURE
Please uncompress the content of the zip file in a local path of Client Work Station like C:\temp. This will create a folder image under this path like C:\temp\image. To apply workaround just run the image.bat executable under [PATH]\image.
Note: Before running image.bat, close all Khameleon applications and applications that are using Java executable.
Output:
Close all Khameleon forms which are using Java Executable
Press any key to continue . . .
Current Java version according to the registry is 1.6.0_23
Current Java version according to the registry is C:\Program Files\Java\jre6
copying imagecfg.exe file to C:\WINDOWS\system32
1 file(s) copied.
Killing if any java executable running .......
ERROR: The process "java.exe" not found.
1 file(s) copied.
C:\Program Files\Java\jre6\bin\java.exe contains the following configuration inf
ormation:
C:\Program Files\Java\jre6\bin\java.exe contains a Subsystem Version of 4.0
C:\Program Files\Java\jre6\bin\java.exe updated with the following configuration
information:
Image can only run in uni-processor mode on multi-processor systems
Image can only run in uni-processor mode on multi-processor systems
Now Java executable was running on Single executable....
Press any key to continue . . .
The final output should be as below:
Image can only run in uni-processor mode on multi-processor systems
Image can only run in uni-processor mode on multi-processor systems
Known Issues:
Check whether user running image.bat has full Permissions on JAVA_HOME\bin\java.exe
Steps involved with in image.bat automated scripts:
Following are the steps that are implemented within image.bat batch file
Finding Current Java version installed on local workstation
Finding Current Java Home according to the registry
Copy imagecfg.exe tool to %systemroot%\system32
IMAGECFG is a utility that probably does a lot of things, but the only reason we are use it is to assigning an executable to specific logical CPUs permanently (by modifying the .exe file.
Kill if any java executable was running.
Backup java executable before modifying.
Run imagecfg.exe to modify Java executable to run with uni-Processor.
JAVA UPGRADE:
If we are planning to upgrade Java to new available version, Following are the steps that are involved:
Uninstall old version of java from Client workstation
Install latest version of Java
Run image.bat file to modify newly installed Java executable to run with uni-Processor.