Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on JAR file in Tomcat\lib directory

 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Eclipse I have a project where in the build path under the Libraries tab there is listed Apache Tomcat v6.0 [Apache Tomcat v6.0] because in the Tomcat\lib directory there are a number of jars that pertain to this project. I have updated one of the jars in this library. However, when I'm using the debugger in Eclipse and I reference the compiled class in this jar it does not show the updated class where I added 4 lines of code and that I exported out to this jar. I have verified that the jar that I exported to this directory contains the updated class in the jar but again, the debugger appears to show a non-updated class from somewhere else.

Does Tomcat cache in some way files in the lib directory?

Any suggestions or direction would be greatly appreciated.

Thank you.

 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My apologies, but my problem was resolved..

Thanks.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(It's good to follow up with the solution so other people can benefit from your knowledge--thanks!)
 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My apologies - but I'm not sure how my problem was resolved. All I did was try to export the JAR again to the Tomcat\lib directory and then I was able to see it in Eclipse. Unfortunately, I cannot tell you what resolved the issue. I just did it again.

Regards.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah. Also, FWIW, be cautious about putting application-specific libraries in the Tomcat lib directory--this can cause problems with just a single application, but with multiple applications, the situation becomes much worse when different versions of the same library are required. In general, deploy application libraries with the application.
 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, David. Appreciate the info.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic