*
The moose likes IDEs, Version Control and other tools and the fly likes j2ee project dependency and project reference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "j2ee project dependency and project reference" Watch "j2ee project dependency and project reference" New topic
Author

j2ee project dependency and project reference

FY Hsieh
Ranch Hand

Joined: Aug 07, 2006
Posts: 73
I am using eclipse/myeclipse ide to develop EAR application. The EAR project includes some EJB projects and a WEB project. The question I have is quite general --

If I define a java class A in project proj_A, how can another java class B in a different project B able to access class A ?

Can I

1) let project B have a "project reference" to project A ?

OR

2) In the properties of project B, can I choose "j2ee module dependency" and includes "project A" there ?

which way(s) is the right way ?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

I usually in the properties for project B select Java Build Path, Projects tab, and click Add to add project A.

By the way, I hope that project A is not the WAR otherwise this will not work at runtime.


JBoss In Action
 
Consider Paul's rocket mass heater.
 
subject: j2ee project dependency and project reference
 
Similar Threads
porting to Oracle 11g weblogic server
J2ee project ws Java Project
referenced project, j2ee dependency module, java build path
Directions of Stereotype-Reading, of Navigation and of Dependency
access java classes defined in another project in Eclipse