facebook

class path issue

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #307011 Reply

    rsingh03
    Member

    I am using MyEclipse Blue Edition Version: 8.0 Blue. I am trying to add a class from one Java Web Project to another one. I have tried the following

    1. I tried to add class folder
    2. Tried to add project in project references
    3. Also tried adding the exact classes using the add jars

    None of them have helped to include the class to the classpath. Are you able to tell me what I am missing.

    Thanks

    #307016 Reply

    rsingh03,
    Please go through the following link on how to add dependent java projects to web projects –
    http://www.myeclipseide.com/documentation/quickstarts/webprojects/#dependent_projects

    #307088 Reply

    rsingh03
    Member

    Hi Shalini,

    Thanks for your reply. I had followed the steps mentioned in the link you sent to me. I do not get compile time errors but at runtime the classess in the web project are not found and I get java.lang.RuntimeException: Unable to find Class for name errors. Also in the deployed folder I cannot see the classess in the WEB-INF\lib or in the WEB-INF\classes folders. I have selected the smart deploy option for deployment. Is there something else I need to do?

    Thanks

    #307092 Reply

    rsingh03
    Member

    The thing is project that I am trying to reference is a java web project. I have included a java project and that works fine. So is there some special setting for including classes from a WEB project

    #307159 Reply

    rsingh03,
    Add the second web project as a referenced project to the first project. Now add the two web projects to an EAR project as web modules. This will allow the Web project to reference its dependent project.

    Let me know if that helps

    #307253 Reply

    rsingh03
    Member

    Shalini,

    I tried that I created an EAR project and add the 2 web projects as web modules. I am using tomcat as the application server, now when i deploy my web project as normal and run I still get the same error as before ie java.lang.ClassNotFoundException. Also I noticed the deployed application does not have the classes that I am using at runtime. Do I need to do something with the EAR project?

    #307255 Reply

    rsingh03,
    You will have to deploy the EAR application to application servers like glassfish, Jboss etc.

    #307498 Reply

    rsingh03
    Member

    Hi Shalini,

    Is there any way to do this on tomcat that is the application server that we are using?

    Thanks
    Reena

    #307500 Reply

    Reena,
    I am afraid, you cannot use tomcat as it is not a full Java EE application server.
    Please refer to the following link for further reference –
    http://www.javaworld.com/javaworld/jw-01-2008/jw-01-tomcat6.html?page=1

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: class path issue

You must be logged in to post in the forum log in