本文发表在 rolia.net 枫下论坛I'm not sure if "cross-reference" is the right word to use here. the problem is:
I have two dummy projects built in Eclipse. In project1, there's the following class:
package ca.company.project1;
import com.institute.project2.Employee;
public class Department {
private int departmentId;
private String name;
private Employee manager;
........
}
in project2, I have the following class:
package com.institute.project2;
import ca.company.project1.Department;
public class Employee {
private int id;
private String name;
private String dob;
private String phone;
private Department department;
......
}
To make this to work, I added project1 to project2's build path, also added project2 to project1's build path. Now the classes themselves are ok, but Eclipse complaint:
"A cycle was detected in the build path of projectX. The project cannot be built until build path errors are resolved."
Can anyone please tell me what I'm doing wrong, what's the right way to do it if I wanted to keep the current project and package structure?
Thanks in advance!更多精彩文章及讨论,请光临枫下论坛 rolia.net
I have two dummy projects built in Eclipse. In project1, there's the following class:
package ca.company.project1;
import com.institute.project2.Employee;
public class Department {
private int departmentId;
private String name;
private Employee manager;
........
}
in project2, I have the following class:
package com.institute.project2;
import ca.company.project1.Department;
public class Employee {
private int id;
private String name;
private String dob;
private String phone;
private Department department;
......
}
To make this to work, I added project1 to project2's build path, also added project2 to project1's build path. Now the classes themselves are ok, but Eclipse complaint:
"A cycle was detected in the build path of projectX. The project cannot be built until build path errors are resolved."
Can anyone please tell me what I'm doing wrong, what's the right way to do it if I wanted to keep the current project and package structure?
Thanks in advance!更多精彩文章及讨论,请光临枫下论坛 rolia.net