Bug 545912 - [Mac] Installed JRE Search should default directory dialog to java home
Summary: [Mac] Installed JRE Search should default directory dialog to java home
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.11   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.12 RC1   Edit
Assignee: Lakshmi P Shanmugam CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-29 01:19 EDT by Sarika Sinha CLA
Modified: 2019-05-30 01:53 EDT (History)
4 users (show)

See Also:
register.eclipse: review+
sarika.sinha: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sarika Sinha CLA 2019-03-29 01:19:16 EDT
Taking out from Bug 526815 -
1. The Directory dialog should be presented by defaulting it java_home
2. It should bring back the previous Java naming behavior (org.eclipse.jdt.internal.launching.MacInstalledJREs.parseJREInfo(InputStream, IProgressMonitor)) 
.
Comment 1 Sarika Sinha CLA 2019-05-06 05:45:58 EDT
@Till, 
Are you interested in fixing this?
Comment 2 Till Brychcy CLA 2019-05-16 13:58:04 EDT
(In reply to Sarika Sinha from comment #1)
> @Till, 
> Are you interested in fixing this?

Sorry for the delayed response, currently I don't have time for this.
Comment 3 Eclipse Genie CLA 2019-05-28 02:18:58 EDT
New Gerrit change created: https://git.eclipse.org/r/142890
Comment 4 Lakshmi P Shanmugam CLA 2019-05-28 02:24:21 EDT
While testing with a new workspace, I found that the installed JREs dialog is already populated with the installed JREs in /Library/Java/JavaVirtualMachines and with the correct JVM names.
So I think this bug is a problem only for existing workspaces or when a new Java version is installed.
Comment 5 Lakshmi P Shanmugam CLA 2019-05-28 02:28:48 EDT
(In reply to Eclipse Genie from comment #3)
> New Gerrit change created: https://git.eclipse.org/r/142890

The patch sets the default location in the directory dialog to /Library/Java/JavaVirtualMachines. I've restored the doMacSearch() code, which does a fast mac search using java_home -X and parses the required info from the returned XML plist. If the default location is used for search, the fast mac search is used, otherwise the common search is used.
Comment 6 Till Brychcy CLA 2019-05-28 03:03:19 EDT
(In reply to Lakshmi Shanmugam from comment #5)
> (In reply to Eclipse Genie from comment #3)
> > New Gerrit change created: https://git.eclipse.org/r/142890
> 
> The patch sets the default location in the directory dialog to
> /Library/Java/JavaVirtualMachines. I've restored the doMacSearch() code,
> which does a fast mac search using java_home -X and parses the required info
> from the returned XML plist. If the default location is used for search, the
> fast mac search is used, otherwise the common search is used.

Simple and effective, very good.
Comment 7 Lakshmi P Shanmugam CLA 2019-05-28 04:10:51 EDT
Thanks for the quick review, Till!
Comment 8 Sarika Sinha CLA 2019-05-28 04:23:55 EDT
Thanks Lakshmi!

+1 for RC1.
Comment 10 Lakshmi P Shanmugam CLA 2019-05-30 01:53:00 EDT
Verified in I20190529-2005