matlab设置java环境,如何调试我从MATLAB环境调用的Java源代码?

Based on the following link:

In order to debug Java code being called from the MATLAB environment, use the following steps:

Relaunch MATLAB using the -jdb flag from a command prompt. For example:

matlab -jdb

(by default this flag will enable debugging support in the VM on port 4444)

You can either launch a Java debugger from a Java IDE such as Eclipse and Intellij, or call jdb from the system command prompt. MATLAB displays the message “JVM is being started with debugging enabled” and provides the appropriate information. For example:

jdb -connect com.sun.jdi.SocketAttach:port=4444

After attaching the debugger you will be able to set breakpoints as you normally would.

Can anyone explains these steps more detail, especially for step 3? How to attach the debugger (Assuming I'm using eclipse).

Thanks

解决方案

3) in details.

Import your java project to eclipse (possible without, but easier this way)

Configure your java-project to use the same JRE your matlab-version uses. Maybe you have to install it because Matlab has a bundled version (Not required to debug, but required to modify and recompile)

Create a new launch configuration for debugging, set IP and Port.

Run the configuration, to attach to an existing application.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值