Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 68378 Details for
Bug 188648
ECJ compiler fails to find boot classes on Harmony
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_188648.txt (text/plain), 4.13 KB, created by
Olivier Thomann
on 2007-05-23 12:14:17 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-05-23 12:14:17 EDT
Size:
4.13 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v >retrieving revision 1.300 >diff -u -r1.300 Main.java >--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 7 May 2007 17:01:22 -0000 1.300 >+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 23 May 2007 16:13:14 -0000 >@@ -1947,7 +1947,6 @@ > paths[i], customEncoding, false, true); > } > } else { >- final File javaHome = getJavaHome(); > bootclasspaths = new ArrayList(DEFAULT_SIZE_CLASSPATH); > /* no bootclasspath specified > * we can try to retrieve the default librairies of the VM used to run >@@ -1961,36 +1960,62 @@ > } > > /* >- * Handle >= JDK 1.2.2 settings: retrieve rt.jar >+ * Handle >= JDK 1.2.2 settings: retrieve the bootclasspath > */ >- if (javaHome != null) { >- File[] directoriesToCheck = null; >- if (System.getProperty("os.name").startsWith("Mac")) {//$NON-NLS-1$//$NON-NLS-2$ >- directoriesToCheck = new File[] { >- new File(javaHome, "../Classes"), //$NON-NLS-1$ >- }; >- } else { >- directoriesToCheck = new File[] { >- new File(javaHome, "lib") //$NON-NLS-1$ >- }; >- } >- File[][] systemLibrariesJars = getLibrariesFiles(directoriesToCheck); >- if (systemLibrariesJars != null) { >- for (int i = 0, max = systemLibrariesJars.length; i < max; i++) { >- File[] current = systemLibrariesJars[i]; >- if (current != null) { >- for (int j = 0, max2 = current.length; j < max2; j++) { >- FileSystem.Classpath classpath = >- FileSystem.getClasspath(current[j].getAbsolutePath(), >- null, false, null, null); >- if (classpath != null) { >- bootclasspaths.add(classpath); >+ // check bootclasspath properties for Sun, JRockit and Harmony VMs >+ String bootclasspathProperty = System.getProperty("sun.boot.class.path"); //$NON-NLS-1$ >+ if ((bootclasspathProperty == null) || (bootclasspathProperty.length() == 0)) { >+ // IBM J9 VMs >+ bootclasspathProperty = System.getProperty("vm.boot.class.path"); //$NON-NLS-1$ >+ } >+ if ((bootclasspathProperty == null) || (bootclasspathProperty.length() == 0)) { >+ // Harmony using IBM VME >+ bootclasspathProperty = System.getProperty("org.apache.harmony.boot.class.path"); //$NON-NLS-1$ >+ } >+ if ((bootclasspathProperty != null) && (bootclasspathProperty.length() != 0)) { >+ StringTokenizer tokenizer = new StringTokenizer(bootclasspathProperty, File.pathSeparator); >+ String token; >+ while (tokenizer.hasMoreTokens()) { >+ token = tokenizer.nextToken(); >+ FileSystem.Classpath currentClasspath = FileSystem >+ .getClasspath(token, customEncoding, null); >+ if (currentClasspath != null) { >+ bootclasspaths.add(currentClasspath); >+ } >+ } >+ } else { >+ // try to get all jars inside the lib folder of the java home >+ final File javaHome = getJavaHome(); >+ if (javaHome != null) { >+ File[] directoriesToCheck = null; >+ if (System.getProperty("os.name").startsWith("Mac")) {//$NON-NLS-1$//$NON-NLS-2$ >+ directoriesToCheck = new File[] { >+ new File(javaHome, "../Classes"), //$NON-NLS-1$ >+ }; >+ } else { >+ // fall back to try to retrieve them out of the lib directory >+ directoriesToCheck = new File[] { >+ new File(javaHome, "lib") //$NON-NLS-1$ >+ }; >+ } >+ File[][] systemLibrariesJars = getLibrariesFiles(directoriesToCheck); >+ if (systemLibrariesJars != null) { >+ for (int i = 0, max = systemLibrariesJars.length; i < max; i++) { >+ File[] current = systemLibrariesJars[i]; >+ if (current != null) { >+ for (int j = 0, max2 = current.length; j < max2; j++) { >+ FileSystem.Classpath classpath = >+ FileSystem.getClasspath(current[j].getAbsolutePath(), >+ null, false, null, null); >+ if (classpath != null) { >+ bootclasspaths.add(classpath); >+ } > } > } > } > } > } >- } >+ } > } > return bootclasspaths; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 188648
:
68374
|
68378
|
68417