How do I instantiate a java interface from matlab?
5 次查看(过去 30 天)
显示 更早的评论
I am trying to instantiate an interface of a java class. In java I would:
Class.IInterface newinterface = new
(I think)... But how can I do this within the matlab syntax?
1 个评论
Richard Alcock
2011-5-3
Is you example missing something - it ends rather suddenly, and isn't currently valid Java.
回答(2 个)
Andy Zelenak
2019-10-11
编辑:Andy Zelenak
2019-10-11
I can confirm that it is possible to do this. I've used javaMethod(...) to call public static methods of a Java class which implements an interface. It didn't seem to take any unusual setup effort.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Java from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!