Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 307109 - All JREs are a perfect match for JavaSE-1.6 on OS X
Summary: All JREs are a perfect match for JavaSE-1.6 on OS X
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.6 M7   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-25 13:47 EDT by Ralf Ebert CLA
Modified: 2010-04-20 10:48 EDT (History)
3 users (show)

See Also:


Attachments
Execution environment preference page showing all JREs as perfect match for JavaSE-1.6 (92.05 KB, image/png)
2010-03-25 13:48 EDT, Ralf Ebert CLA
no flags Details
Fix for MacOSXVMInstallType (6.36 KB, patch)
2010-03-28 14:58 EDT, Ralf Ebert CLA
no flags Details | Diff
mylyn/context/zip (6.81 KB, application/octet-stream)
2010-03-28 14:59 EDT, Ralf Ebert CLA
no flags Details
Fix for MacOSXVMInstallType (6.27 KB, patch)
2010-03-28 19:39 EDT, Ralf Ebert CLA
no flags Details | Diff
Fix for MacOSXVMInstallType (7.41 KB, patch)
2010-03-28 20:04 EDT, Ralf Ebert CLA
darin.eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Ebert CLA 2010-03-25 13:47:29 EDT
Build Identifier: 3.6M6, I20100312-1448

The execution environment preference pane shows all JREs as perfect match for JavaSE-1.6. Happens in 3.5.2 and 3.6M6 for me. See attached screenshot. Because of this it picks 1.4 when launching with EE JavaSE-1.6.

Reproducible: Always
Comment 1 Ralf Ebert CLA 2010-03-25 13:48:42 EDT
Created attachment 163018 [details]
Execution environment preference page showing all JREs as perfect match for JavaSE-1.6
Comment 2 Markus Keller CLA 2010-03-25 15:38:01 EDT
Reason could be that the other JREs are not really what they pretend to be. I remember that Apple decided to throw away all old JRE during an update (I don't remember when exactly, but could have been the update to Mac OS X 10.6).

After that, the older JREs were just soft links to the 1.6.0 JRE. So I guess this is in fact a NOT_ECLIPSE bug. However, most people will get into this situation with recent versions of the OS, so maybe the Mac JRE detector could be enhanced so that it omits the disguised JREs.
Comment 3 Ralf Ebert CLA 2010-03-25 17:12:07 EDT
I'm running 10.6 and indeed, all old versions are symbol links to the current JDK:

ls -la /System/Library/Frameworks/JavaVM.framework/Versions/
total 64
drwxr-xr-x  13 root  wheel  442 11 Mär 09:01 .
drwxr-xr-x  12 root  wheel  408 11 Mär 09:00 ..
lrwxr-xr-x   1 root  wheel    5 11 Mär 09:00 1.3 -> 1.3.1
drwxr-xr-x   3 root  wheel  102 20 Jul  2009 1.3.1
lrwxr-xr-x   1 root  wheel   10 11 Mär 09:00 1.4 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10 11 Mär 09:00 1.4.2 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10 11 Mär 09:00 1.5 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10 11 Mär 09:00 1.5.0 -> CurrentJDK
lrwxr-xr-x   1 root  wheel    5 11 Mär 09:00 1.6 -> 1.6.0
drwxr-xr-x   8 root  wheel  272 11 Mär 07:08 1.6.0
drwxr-xr-x   9 root  wheel  306 11 Mär 09:00 A
lrwxr-xr-x   1 root  wheel    1 11 Mär 09:00 Current -> A
lrwxr-xr-x   1 root  wheel    3 11 Mär 09:00 CurrentJDK -> 1.6
Comment 4 Ralf Ebert CLA 2010-03-28 14:58:55 EDT
Created attachment 163190 [details]
Fix for MacOSXVMInstallType

Fixed MacOSXVMInstallType to use canonical file names to correctly resolve symbolic links and cleaned up the code a bit along the way.
Unfortunately, JVMs are not rescanned for existing workspaces, is there a way to enforce this? Adding extra code to throw out the bogus entries seems a bit too far off the way.
Comment 5 Ralf Ebert CLA 2010-03-28 14:59:01 EDT
Created attachment 163191 [details]
mylyn/context/zip
Comment 6 Ralf Ebert CLA 2010-03-28 19:39:37 EDT
Created attachment 163198 [details]
Fix for MacOSXVMInstallType
Comment 7 Ralf Ebert CLA 2010-03-28 20:04:36 EDT
Created attachment 163200 [details]
Fix for MacOSXVMInstallType

cleanups
Comment 8 Darin Wright CLA 2010-04-07 12:54:47 EDT
Comment on attachment 163200 [details]
Fix for MacOSXVMInstallType

Applied patch, updated copyrights.
Comment 9 Darin Wright CLA 2010-04-07 12:55:10 EDT
Applied/Fixed. Thanks Ralf.
Comment 10 Darin Wright CLA 2010-04-07 12:55:18 EDT
Verified.
Comment 11 Ralf Ebert CLA 2010-04-19 20:48:09 EDT
This was not updated by p2 when I updated to org.eclipse.sdk.ide 3.6.0.I20100414-1200, still got org.eclipse.jdt.launching.macosx 3.2.0.201003282049.
Comment 12 Darin Wright CLA 2010-04-20 10:48:24 EDT
(In reply to comment #11)
> This was not updated by p2 when I updated to org.eclipse.sdk.ide
> 3.6.0.I20100414-1200, still got org.eclipse.jdt.launching.macosx
> 3.2.0.201003282049.

Just checked the Mac install here - it has the latest/correct version of the launching bundle. If you have a case where updating from one build to the next does not work, I would suggest to file a bug against Equinox/p2.