aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes access java classes defined in another project in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "access java classes defined in another project in Eclipse" Watch "access java classes defined in another project in Eclipse" New topic
Author

access java classes defined in another project in Eclipse

ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 370
I created a j2ee enterprise project which includes few EJB projects and one Web project. I also created a standalone java project.

In order for my ejb project java code to use the java class defined in that standalone project, I tried the following ways --

a) For the EJB project, I added that standalone project in its "project reference"
b) For the EJB project, in its Java Build path, I added that stand alone project in the "project" tab.

It seems only method b) works and method a) does not.

Wondering why ? I thought if a project A has project B in A's project reference, then any java code in Project B should be visible to java code defined in project A, correct ?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15632
    
  15

You don't reference a project in a build, you reference resources.

For example, you might want Project B to be able to use Project A's build classes, but not its test classes. Referring to Project A as a unit wouldn't allow you to make that distinction.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: access java classes defined in another project in Eclipse
 
Similar Threads
Reuse of Data Source
Looking up local ejb in custom thread..
why object defined in the method are created in the heap memory?
Issue Whie Deploying EJB on JBoss AS 5.1.0...
how do i solve this error caused due to problem in spring initiation on tomcat