Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 112847

Summary: org.eclipse.jdt.internal.compiler.batch.Main.compile() does not find dependent classes.
Product: [Eclipse Project] JDT Reporter: Bala Balakumran <balakuma>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: CLOSED WORKSFORME QA Contact:
Severity: critical    
Priority: P3 CC: deboer, philippe_mulet, yenlu
Version: 3.1.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Log from the compilation of the Main class none

Description Bala Balakumran CLA 2005-10-17 15:41:09 EDT
We have an eclipse based application that calls 
org.eclipse.jdt.internal.compiler.batch.Main.compile() for directly
compiling some java files.  When A.java references B.java
and only A.java is passed to the compile we get the compile error message
class B not found.  This is happening in 3.1.1

When the org.eclipse.jdt.core_3.1.0 jar is used instead of the
_3.1.1.jar the problem goes away.  (Both A.java and B.java are compiled
by the compiler) Also the application works 
correctly using eclipse 3.0.1 as well.

So this seems like a bug introduced in 3.1.1
Comment 1 Olivier Thomann CLA 2005-10-17 15:43:40 EDT
Could you please provide a test case that works with 3.1.0, but fails with 3.1.1?
Comment 2 Olivier Thomann CLA 2005-10-17 15:44:06 EDT
Philippe, I will investigate it.
Comment 3 Philipe Mulet CLA 2005-10-17 16:07:29 EDT
Olivier - would that be related to the fix for bug 110826
Comment 4 Olivier Thomann CLA 2005-10-17 17:25:01 EDT
I don't think so.
bug 110826 is about starting the batch compiler. Here it seems to be related
about compiling dependant classes.
Waiting for a test case with steps to reproduce.
Comment 5 Olivier Thomann CLA 2005-10-17 19:23:40 EDT
*** Bug 112854 has been marked as a duplicate of this bug. ***
Comment 6 Olivier Thomann CLA 2005-10-17 19:54:29 EDT
Using 3.1.1 jar, I could successfully recompile the batch compiler source
providing only org\eclipse\jdt\internal\compiler\batch\Main.java.
So we definitely need a test case.
I will attach the log retrieved using the verbose mode.
Comment 7 Olivier Thomann CLA 2005-10-17 19:57:09 EDT
Created attachment 28370 [details]
Log from the compilation of the Main class
Comment 8 Olivier Thomann CLA 2005-10-17 19:59:34 EDT
Closing as REMIND.
Please reopen when the requested test case and steps to reproduce are available.
Comment 9 Olivier Thomann CLA 2005-10-17 20:10:47 EDT
Reopen. I'll try remogte debugging tomorrow.
Comment 10 Olivier Thomann CLA 2005-10-18 13:42:08 EDT
Closing as WORKSFORME. Seems to be a setting problem.
Comment 11 Bala Balakumran CLA 2005-11-23 11:45:44 EST
need to pass -sourcepath arg to the compiler