如何将 Eclipse 连接到远程服务器上托管的 WebSphere 应用程序服务器?

发布于 2024-12-29 12:25:20 字数 88 浏览 3 评论 0原文

我正在尝试使用 eclipse 调试本地代码(位于我的笔记本电脑上),我正在尝试连接到远程托管的 WAS(WebSphere 应用程序服务器)和远程托管的数据库。

I am trying to debug a local code ( which is on my laptop) using eclipse, which I am trying to connect to the remotely hosted WAS( WebSphere Application server) and remotely hosted database.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

仅此而已 2025-01-05 12:25:20

要远程连接到 WAS,首先从 WebSphere Integrated Solutions Console:

  1. 导航到应用程序服务器的调试服务:
    • 服务器>服务器类型> WebSphere应用程序服务器> [服务器名称]>调试服务
  2. 选中“服务器启动时启用服务”复选框
  3. 如果需要,添加/修改“JVM 调试端口”(该端口不得已在服务器上使用)
  4. 如果需要,则添加/修改“JVM 调试参数”必要(默认情况下可能已经出现):
    • -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777
  5. 应用更改,保存新配置,

然后 重新启动应用程序服务器,从 Eclipse IDE:

  1. 打开“调试”对话框(例如运行 > 调试配置...
  2. 右键单击“远程 Java 应用程序”并选择“新建”
  3. 配置远程 Java 应用程序:
    1. 命名调试配置
    2. 浏览并选择要调试的项目(可选)
    3. 使用“标准(套接字连接)”连接类型
    4. 指定 WAS 服务器的主机名
    5. 指定在 WAS 调试选项中设置的端口号
  4. 单击应用
  5. 单击调试

(这些说明适用于 WAS 7.0,但其他版本应该类似。)

To remotely connect to WAS, first, from the WebSphere Integrated Solutions Console:

  1. Navigate to the application server's Debugging Service:
    • Servers > Server Types > WebSphere application servers > [serverName] > Debugging Service
  2. Check the "Enable service at server startup" checkbox
  3. Add/modify the "JVM debug port" if necessary (the port must not already be in use on the server)
  4. Add/modify the "JVM debug arguments" if necessary (this may already appear by default):
    • -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777
  5. Apply the changes, Save the new configuration, and Restart the application server

Then, from the Eclipse IDE:

  1. Open the "Debug" dialog (e.g. Run > Debug Configurations...)
  2. Right-click "Remote Java Application" and select "New"
  3. Configure the Remote Java Application:
    1. Name the debug configuration
    2. Browse to select the project to debug (optional)
    3. Use the "Standard (Socket Attach)" Connection Type
    4. Specify the hostname of your WAS server
    5. Specify the port number that was set in the WAS debug options
  4. Click Apply
  5. Click Debug

(These instructions are for WAS 7.0, but should be similar for other versions.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文