How do I instantiate a java interface from matlab?
Ältere Kommentare anzeigen
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 Kommentar
Richard Alcock
am 3 Mai 2011
Is you example missing something - it ends rather suddenly, and isn't currently valid Java.
Antworten (2)
Paulo Silva
am 7 Apr. 2011
0 Stimmen
1 Kommentar
Alexander
am 7 Apr. 2011
Andy Zelenak
am 11 Okt. 2019
Bearbeitet: Andy Zelenak
am 11 Okt. 2019
0 Stimmen
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.
Kategorien
Mehr zu Call Java from MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!