Tomcat throws ClassNotFound exceptions for classes in other open eclipse projects

后端 未结 6 986
予麋鹿
予麋鹿 2020-12-08 01:05

I have an eclipse project structure that looks something like this:

eclipse
    project a
    project b

All of these projects are Maven pro

6条回答
  •  余生分开走
    2020-12-08 01:44

    What you need to do is this:

    1. In Eclipse go to Window > Show View > Servers > and open tab called Servers
    2. In Servers, double click the server you want
    3. This action should open a window entitled Overview, with your selected Server in the TAB
    4. In this window select: Open launch configuration, and click the link.
    5. In the Edit Configuration window, select the tab called Classpath
    6. In the ClassPath textbox, select the line: User Entries
    7. Now push the button on the right entitled: Add Projects
    8. In the resulting Project Selection window select the external project you want the server to find via click.
    9. Close these windows by clicking Apply then OK as appropriate as you work up the stack
    10. Restart your server in the Overview window

    You should be ready to go. It's actually only a 2 minute exercise. Good luck

提交回复
热议问题