Community
Participate
Working Groups
I20120123-1800, Mac OS X 10.7.2, follow-up to bug 325777 'Preferences > Installed JREs > Search...' should also find JDKs from Developer Packages. Looks like the implementation currently only finds VMs in /System/Library/Java/JavaVirtualMachines/ It should also search in /Library/Java/JavaVirtualMachines/ That's the place where Java Developer Packages from https://developer.apple.com/downloads/index.action are installed (search for 'Java'). These VMs are also listed by /usr/libexec/java_home -X The Developer Packages are interesting because they also include source. To add them in Eclipse today, you have to know the full path into the bundled folder. The Directory... chooser won't bring you there. In my case, it was: /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home
(In reply to comment #0) > That's the place where Java Developer Packages from > https://developer.apple.com/downloads/index.action are installed (search for '> Java'). I cannot get access to one of these packages as I am not a registered Apple developer and have no intention of creating an Apple account. > These VMs are also listed by /usr/libexec/java_home -X Markus, would it possible for you to run this for me so I can see the shape of the XML for the developer packages in the output (I assume it is the same as the rest, but maybe not)? Put a breakpoint in MacInstalledJREs line 154 and copy the text out of the details pane.
Created attachment 212105 [details] /usr/libexec/java_home -X
Created attachment 214636 [details] partial fix This patch contains a fix that allows the Mac VM searching to ignore any invalid VM definitions (ones that fail to parse, etc) and return any VMs it does find - before it would abort completely and return none. The logic to compute the VM id is also updated. Testing this patch I was able to search for and find all VMs - developer ones included - on Silenio's Snow Leopard machine.
(In reply to comment #3) > Testing this patch I was able to search for and find all VMs - developer ones > included - on Silenio's Snow Leopard machine. I pushed the patch to: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=118a08613f14fbf910ee63d882ae035942f93cc1 Markus, if you have a Lion machine, I would be interested to know if the patch works there as well.
I pushed more tests for our plist parser + JREDescriptor here: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=cdee84d00f6fac0350e76b4780eda4000eae5da1
*** Bug 377849 has been marked as a duplicate of this bug. ***
I didn't thoroughly check the code, but I verified that everything works fine with the I20120427-1000 on my Mac OS X Lion (10.7.3) install.
(In reply to comment #7) > I didn't thoroughly check the code, but I verified that everything works fine > with the I20120427-1000 on my Mac OS X Lion (10.7.3) install. I pushed an additional change the prevents JREs with the same path from being added as separate JREs. This case was found by adding a JRE by hand (using the Add.. button) and then doing a search. Duplicates would show up because of the way we used compute the ID for a VMStandin.
(In reply to comment #8) > I pushed an additional change the prevents JREs with the same path from being > added as separate JREs. This case was found by adding a JRE by hand (using the > Add.. button) and then doing a search. Duplicates would show up because of the > way we used compute the ID for a VMStandin. The commit: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=159480c84f7f681d88f2e7f6d7e065a97895d613
marking fixed