Project: JDT
Bug 152176 [quick fix] Request to recognize J9 executable as Java executable
Reported: 2006-07-28 13:08:14 | Status: verified fixed

This problem came up when using jclDesktop J9 JRE as the default JRE and try to do a quickfix to generate serialversionUID. The code that obtains the java executable in org.eclipse.jdt.internal.ui.text.correction.SerialVersionLaunchConfigurationDelegate.getJavaExecutable() fails to recognize that j9.exe (or j9) is a valid java executable. It is hard coded in method findJavaExecutable() to look only for java or javaw executable. The IJavaLaunchConfigurationConstants.ATTR_JAVA_COMMAND is set by the SerialVersionLaunchConfigurationDelegate which has no knowledge of the J9. We currently have no hooks into the SerialVersion with respect to J9. So the request is to make j9 and j9w as valid recognizable java executables in the string array "fgExecutableLocations". To reproduce the problem the following was done: 1. Install any J9 JRE (as part of Lotus Expeditor/WED toolkit team we used jclDesktop JRE). 2. Make jclDesktop JRE the default JRE. 3. Create a project with a class that implements java.io.Serializable but does not contain serialVersionUID. This will generate a warning. 4. Use the quickfix option and select add generated serial version ID. 5. That will generate a error dialog. Note: This will not fail if a J2SE JRE is chosen. Debugging this problem showed the problem in the JDT code at the above described location.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SerialVersionLaunchConfigurationDelegate.java