• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
It's feeding time! Give me the food you were going to give to this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic