Bug 20215

Summary: Batch compiler ignores the CLASSPATH env variable
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Patch to support a new option -bootclasspath none

Description Philipe Mulet CLA 2002-06-13 12:12:28 EDT
Build 20020612 F3

It appears that the command line compiler ignores the CLASSPATH environment 
variable.  

Could be improved
Comment 1 Philipe Mulet CLA 2002-06-13 12:12:41 EDT
Post 2.0
Comment 2 Philipe Mulet CLA 2002-07-25 06:59:44 EDT
Reopening
Comment 3 Philipe Mulet CLA 2002-07-25 07:01:02 EDT
Clearing resolution
Comment 4 Philipe Mulet CLA 2002-07-25 07:34:51 EDT
Please investigate
Comment 5 Olivier Thomann CLA 2002-07-25 08:38:17 EDT
There is no perfect way to get the CLASSPATH environment variable.
The best we could do is to use a specific property name for that and then 
invoke the batch compiler with the -D option. Something like:
java -Denv.classpath=%CLASSPATH% ......

And in our code we could check if the property "env.classpath" is set or not.
Does this sound acceptable?
Comment 6 Olivier Thomann CLA 2002-07-31 10:27:17 EDT
It seems that the property java.class.path is set to the value of the classpath
environment variable. So if no classpath is specified, this should be the value
to use or '.' if none. If a classpath is specified, it override the existing
classpath environment variable.
Comment 7 Olivier Thomann CLA 2002-08-01 15:38:20 EDT
The final approach is to add a new option -bootclasspath, which reprensents the
system classes. The -classpath is now converted to the user classpath.
So there is no need anymore to specify the rt.jar in the classpath in order to
compile a class. The batch compiler uses a heuristic to retrieve the system
libraries of the JVM used to run it.
I will attach a patch. This is not officially supported yet. It won't be till
this PR is closed.
Comment 8 Olivier Thomann CLA 2002-08-01 15:39:06 EDT
Created attachment 1783 [details]
Patch to support a new option -bootclasspath
Comment 9 Olivier Thomann CLA 2002-09-05 13:39:54 EDT
Fixed and released in 2.1 stream.
Comment 10 David Audel CLA 2002-09-19 10:13:36 EDT
Verified.