Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 113458 - Reverse classpath order for batch compiler
Summary: Reverse classpath order for batch compiler
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-22 15:29 EDT by 3clips3 CLA
Modified: 2005-10-23 12:49 EDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (1.32 KB, patch)
2005-10-22 15:29 EDT, 3clips3 CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 3clips3 CLA 2005-10-22 15:29:11 EDT
The batch compiler orders the classpath like so...

bootclasspath:exdirsClasspaths:sourcepath:classpaths

I'd like to suggest that this should be:

sourcepath:classpaths:extdirsClasspaths:bootclasspaths

This problem shows up when we use the batch compiler with libgcj.jar in the
bootclasspath.  libgcj.jar contains org.w3c.xml classes which users often want
to override.   Forcing the bootclasspath to the front of the classpath makes
this impossible.  They should be able to override by adding the replacements to
extdirs or CLASSPATH.   I will attach me proposed patch.
Comment 1 3clips3 CLA 2005-10-22 15:29:52 EDT
Created attachment 28656 [details]
Proposed patch
Comment 2 Philipe Mulet CLA 2005-10-23 07:59:24 EDT
Changing the general rule just for libgcj.jar feels wrong. Why did you put it on
the bootclasspath if you want it to be at the end ? Simply put it at the end of
the classpath instead.
Comment 3 3clips3 CLA 2005-10-23 12:49:30 EDT
(In reply to comment #2)
> Changing the general rule just for libgcj.jar feels wrong. 

I just noticed that the class search order was just defined clearly in Sun's 1.5
release - so I agree that we shouldn't change this.  I think various java
compilers were inconsistent in their search order in the past.

> Why did you put it on
> the bootclasspath if you want it to be at the end ? Simply put it at the end of
> the classpath instead.

This is for packages that are part of the endorsed API collection. 
Unfortunately the endorsed standards override mechanism is a pain to use.