在我安装和配置MCR 8.3的Ubuntu机器上执行Matlab,我有这样的错误:
The class "internal.optim" is undefined.
Perhaps Java is not running.
Error in internal.optim.presolve (line 211)
Error in ipqpcommon (line 30)
Error in quadprog (line 353)
Error in mv_low_level_solver_quadprog (line 72)
Error in mv_optim_min_risk (line 47)
Error in Portfolio/estimateFrontierLimits (line 79)
Error in portafoglio (line 63)
... Matlab M-code Stack Trace ...
file /home/zuno/.mcrCache8.3/Portaf0/toolbox/optim/optim/+internal/+optim/presolve.p, name presolve, line 211.
file /home/zuno/.mcrCache8.3/Portaf0/toolbox/optim/optim/private/ipqpcommon.p, name ipqpcommon, line 30.
file /home/zuno/.mcrCache8.3/Portaf0/toolbox/optim/optim/quadprog.m, name quadprog, line 353.
file /home/zuno/.mcrCache8.3/Portaf0/toolbox/finance/finance/@Portfolio/private/mv_low_level_solver_quadprog.p, name mv_low_level_solver_quadprog, line 72.
file /home/zuno/.mcrCache8.3/Portaf0/toolbox/finance/finance/@Portfolio/private/mv_optim_min_risk.p, name mv_optim_min_risk, line 47.
file /home/zuno/.mcrCache8.3/Portaf0/toolbox/finance/finance/@Portfolio/estimateFrontierLimits.m, name estimateFrontierLimits, line 79.
file /home/zuno/.mcrCache8.3/Portaf0/PortafoglioB/portafoglio.m, name portafoglio, line 63.
com.mathworks.toolbox.javabuilder.MWException: The class "internal.optim" is undefined.
Perhaps Java is not running.
at com.mathworks.toolbox.javabuilder.internal.MWMCR.mclFeval(Native Method)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.access$600(MWMCR.java:23)
at com.mathworks.toolbox.javabuilder.internal.MWMCR$6.mclFeval(MWMCR.java:833)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.mathworks.toolbox.javabuilder.internal.MWMCR$5.invoke(MWMCR.java:731)
at com.sun.proxy.$Proxy39.mclFeval(Unknown Source)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.invoke(MWMCR.java:406)
显然Java正在运行,如果我尝试执行其他Matlab函数,我没有问题。 可能是什么问题?
更新 如果我在Windows上使用相同的MCR执行相同的代码......它可以工作......
答案 0 :(得分:1)
我很确定它是在Windows上编译的。 从v83开始,包含已转换库的生成的jar还包含一个.ctf文件,该文件类似于包含Windows DLL的包。 要解决这个问题,你应该重新编译你的jar(我知道这听起来很奇怪,因为java的座右铭是一次运行,但是......这不是一个java问题),而且是64位的linux。
干杯, VD