This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes How i can see a class of another project..? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How i can see a class of another project..?" Watch "How i can see a class of another project..?" New topic
Author

How i can see a class of another project..?

Marco Vanoli
Ranch Hand

Joined: Jan 12, 2005
Posts: 99
I have a web project (A)develped with struts and hibernate. This project (admin tools) act to config the database for another project tha (B). The problem is that i have to use reflection in project A for retrive a class of project B as follow

If i try this code in a Test class out of the container it works but when i try to use it under Tomcat i have the exception.

I tryed to put project B in buidpath myECLIPSE->project->propetries->java build path->projects->add project B ,
but the problem persist.
Also i noticed that when i deploy my webproject A there are no reference to project B, and project B classes are not in the WEB-INF dir of project A. Is it normal?
At least i tried to deploy also project B at the same time but the exception is ever called!

So if someone can help me to discover how i can see a class of another project...

thank you!


bye, <br />Marco
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Not an EJB question, but:

I tryed to put project B in buidpath myECLIPSE->project->propetries->java build path->projects->add project B ,
but the problem persist.

That just adds classes to the build path of your project so you can compile one project which uses classes contained in another project. Once you have deployed your classes onto your servlet container it's the web app's. classpath that is important. You need to deploy the shared classes to the WEB-INF/classes directory of both web apps.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How i can see a class of another project..?
 
Similar Threads
A question from Marcus Green's mock exam
Eclipse project dependancies
Please heeelp..Can't get "packages" to work
Help with Code.. Help with Classes
JVM? Beginning question