WAS 中的运行时类路径
在 RAD 中,当我们创建项目并转到“属性”时,有一个名为“Java EE 模块依赖项”的选项。当我们在这里添加一些 jar 时,它是否会将其添加到运行时路径中?
这个选项有什么用?
另外,当 WAS 正在运行并且部署了多个 EAR 时,WAS 将如何为每个 EAR 获取运行时类路径?所有 EAR 都一样吗?
它会只获取每个 EAR 的构建路径条目吗?
In RAD, when we create a project, and go Properties, there is an option called Java EE Module Dependencies. When we add some jars here, does it add it to the runtime path?
What is this option for?
Also, when WAS is running and multiple EARs are deployed, how will WAS pickup the runtime classpath for each EAR? Will it be the same for all EARs?
Will it just take the Build path entries for each EAR?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
运行时类路径是以下内容的组合。
the runtime class paths are a combination of the following.
运行时类路径和构建路径完全不同(并且没有任何关系)。
Java EE 规范规定了运行时类路径的构成,并使用共享库等 App Server 特定实体向运行时服务器添加其他类路径。
WAS 允许您为每个企业应用程序使用一个类加载器,或者为服务器上托管的所有 EAR 使用一个类加载器。
前者是默认选项,也是首选选项。
通常,当您添加依赖项时,您可以指定其中哪一个应该成为运行时类路径的一部分。
The Runtime class path and Build path are completely different (and have no relationship whatsoever).
The Java EE specs states what constitutes the runtime class path and using App Server specific entities like Shared Library adds additional class paths to the runtime servers.
WAS allows you to have a class loader for each Enterprise Application or have a single classloader for all EARs that are hosted on a server.
The former is the default and the preferred option.
Typically when you add dependencies you can specify which one of these should be part of the runtime class path.