Bug 3206 - Cannot build with .class and .java in the same package (1G4DHS1)
Summary: Cannot build with .class and .java in the same package (1G4DHS1)
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P3 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:51 EDT by Olivier Thomann CLA
Modified: 2002-01-11 09:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2001-10-10 22:51:17 EDT
1) Create a project.
	2) Import in this project the following classes.
		X is from .class file
		Y from .java file.
[package p;

public class X {
	String s;
public X() {
	s = "";
}
public X(String s) {
	this.s = s;
}
}]

[package p;

public class Y {

	X bar() {
		return new X("Hello");
	}
}]

	3) You will have an error saying X cannot be resolved or is not a valid type.

(11/13/00 5:29:07 PM)

NOTES:

OT (11/13/00 5:29:11 PM)
	The builder relies on the Java model to create its states. The package fragment 'p' is tagged as source folder and then the children created for this package fragment are only
	compilation units. The .class files are filtered. Then the builder is unable to find the .class file corresponding to X and failed.
Comment 1 Philipe Mulet CLA 2001-10-11 10:11:23 EDT
Need a library entry on the classpath to use .class files as input.
Closing
Comment 2 DJ Houghton CLA 2001-10-23 23:51:29 EDT
PRODUCT VERSION:
	Eclipse 011