| Summary: | MacOSXVMInstallType.detectInstallLocation() always returns null if findVMInstall succeeds | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Jeff Myers <jeff.myers> | ||||||
| Component: | Debug | Assignee: | Andre Weinand <andre_weinand> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | andre_weinand, fsanders, gmendel | ||||||
| Version: | 3.0 | ||||||||
| Target Milestone: | 3.0.2 | ||||||||
| Hardware: | Macintosh | ||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 47716 | ||||||||
| Attachments: |
|
||||||||
Created attachment 14846 [details]
Patch for OSXVMInstallType
This patch makes detectInstallLocation() function return the VM linked as the
Current JDK in OSX. This function should probably return install location of
the vm associated with the java.home property, as that's the vm that the
platform is currently using (the Javadoc in IVMInstallType says that it should
return the Eclipse platform's vm by default).
The patch applies to the v3.0.1 version of the org.eclipse.jdt.launching.macosx
plug-in.
Move to JDT/Debug Andre, can you look at this one? Darin, sorry, I have looked at the patch, but forgot to update this PR. The patch helps, but is incorrect. I have a better patch but didn't had time to release it. But I'm still willing to fix it for M3. (However, that wouldn't help VE, because they sit on 3.0.1). Thanks Andre, please attach the patch, and Kevin can test/release if you like (he has a Mac test on). Andre, is there anything I can do to help you with this one? Would it be possible to see about getting a fix for this in 3.0.2? That'd be very helpful for the VE. Jeff, could you give the following patch a try? I've created it against HEAD, but it should apply to 3.0.1 too. Thanks. Created attachment 15354 [details]
slightly modified patch for MacOSXVMInstallType.java
I just tried out this latest patch. Seems to work fine. The VE is able to compile template classes and launch properly with this patch in place. Thanks Jeff. I've released the patch. marking as verified re-open to port to 3.0.2 Andre, can you release/merge this fix in to the 3.0.2 build/R3_0_maintenance branch? Yes, will do. released fix into the 3.0.2 build/R3_0_maintenance branch. marking as VERIFIED |
While iterating over the installed versions of Java in the detectInstallLocation method in MacOSXVMInstallType, the following condition evaluates to false if the findVMInstall returns a valid VMInstall for the given version: if (home.exists() && findVMInstall(version) == null && !CURRENT_JVM.equals(version)) { The only place the defaultLocation returned by detectInstallLocation is set is within this if block, so if the default install location is able to be found, the method will return null.