如何使用 Tomcat 应用程序中嵌入的 jython 动态添加 jar?
我想让我的应用程序(应用程序容器)(应用程序包含子应用程序)的用户将 java jar 添加到他们的 jython 路径中。
我让子应用程序管理器在 jython 中编写自己的扩展,但他们想要添加的一些功能需要额外的 jar。 例如,如果他们想检查 svn 存储库,他们需要 svn 访问 jar,我不想将其复制到 /WEB-INF/lib,而是复制到 /subapps/appX/lib。
虽然我可以向 sys.path 添加类目录结构,但似乎无法添加 jar。 是否可以?
I want to let the users of my app, which is in turn an app container (app contains subapps), add java jars to their jython path.
I let the subapp managers write thir own extensions in jython, but some of the functionality they want to add needs additional jars. For example, if they want to check a svn repo, they need the svn access jars, which I would rather not copy to /WEB-INF/lib, but rather to /subapps/appX/lib.
While I can add a class directory structure to sys.path, it seems that I can't add a jar. Is it possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很有趣。 它在命令行中不起作用,但在从 tomcat 尝试时却可以。 缓存可能会有延迟吗?
在命令行中,如果我尝试不存在的导入,缓存管理器会显示为新添加的 jar 找到的新包。 然后然后它就起作用了。
It is funny. It did not work from the command line, but it does when trying from tomcat. Might there be a delay in caching or so?
In the command line, if I try a non-existant import, the cache manager shows the new package found for the newly added jar. And then it works.