为应用程序配置正确的目标运行时

在迁移到 WebSphere Application Server Traditional 或 Liberty 时或者在 WebSphere Traditional 版本间迁移时,必须配置目标运行时以匹配目标应用程序服务器。如果在 Eclipse 中定义了任何服务器运行时,那么此规则会标记目标运行时与目标应用程序服务器不匹配的 Eclipse 项目。

要解决此问题,请右键单击 Project ExplorerPackage Explorer 中的项目,并依次选择 PropertiesTargeted Runtimes。选择目标应用程序服务器,然后单击 Apply。 如果该目标应用程序服务器未显示在可用目标运行时的列表中,请单击 New 以将服务器运行时环境添加到工作空间。

从 WebSphere Traditional 迁移到 Liberty 后,Liberty 服务器可能会因项目上配置的 WebSphere Traditional 项目构面而在视图中处于隐藏状态。请选择 Project facets 并移除与 WebSphere Traditional 相关的任何项目构面。然后,您可以在 Targeted Runtimes 面板中选择 Liberty 服务器。

有关在 Eclipse 中配置目标运行时的更多信息,请参阅 Eclipse 文档 Specifying target servers for J2EE projects