View | Details | Raw Unified | Return to bug 34808 | Differences between
and this patch

Collapse All | Expand All

(-)macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXLaunchingPlugin.java (-2 / +15 lines)
Lines 86-93 Link Here
86
		 * the stub either from the running Eclipse or from the JavaVM
86
		 * the stub either from the running Eclipse or from the JavaVM
87
		 * framework. Here we create the appropriate pathname.
87
		 * framework. Here we create the appropriate pathname.
88
		 */
88
		 */
89
		int pos= 0;
89
		String javaApplStub= System.getProperty("sun.boot.library.path");	//$NON-NLS-1$
90
		String javaApplStub= System.getProperty("sun.boot.library.path");	//$NON-NLS-1$
90
		int pos= javaApplStub.indexOf(':');
91
		if (javaApplStub != null)
92
			pos= javaApplStub.indexOf(':');
91
		if (pos > 0)
93
		if (pos > 0)
92
			javaApplStub= javaApplStub.substring(0, pos);	
94
			javaApplStub= javaApplStub.substring(0, pos);	
93
		String expected= "/Contents/Resources/Java";	//$NON-NLS-1$
95
		String expected= "/Contents/Resources/Java";	//$NON-NLS-1$
Lines 95-101 Link Here
95
			javaApplStub= javaApplStub.substring(0, javaApplStub.length()-expected.length());
97
			javaApplStub= javaApplStub.substring(0, javaApplStub.length()-expected.length());
96
			javaApplStub+= "/Contents/MacOS/";	//$NON-NLS-1$
98
			javaApplStub+= "/Contents/MacOS/";	//$NON-NLS-1$
97
		} else {
99
		} else {
98
			javaApplStub= "/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/"; //$NON-NLS-1$
100
			javaApplStub= System.getProperty("java.class.path");	//$NON-NLS-1$
101
			if (javaApplStub != null)
102
				pos= javaApplStub.indexOf(expected);
103
			else
104
				pos= 0;
105
			if (pos > 0) {
106
				javaApplStub= javaApplStub.substring(0, pos);
107
				javaApplStub+= "/Contents/MacOS/";	//$NON-NLS-1$				
108
			} else {
109
				// fall back
110
				javaApplStub= "/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/"; //$NON-NLS-1$
111
			}
99
		}
112
		}
100
		javaApplStub= "JAVASTUB=\""+ javaApplStub + "\"\n";	//$NON-NLS-1$ //$NON-NLS-2$
113
		javaApplStub= "JAVASTUB=\""+ javaApplStub + "\"\n";	//$NON-NLS-1$ //$NON-NLS-2$
101
		
114
		

Return to bug 34808