how to passs output of Java program to m-file

1 次查看(过去 30 天)
Hello folks,
I have written a Java program which is invoked using system() function, thus it runs on the command window of Matlab. Now I want to know if there's another way to run a Java program other than running it on command window? Can it be run on any user made GUI in Matlab? Another problem is, I want to know if my program has some string value as output, which is generally displayed on command window, how can i store it in variable in Matlab?
Hope to hear from you very soon.

回答(1 个)

Kaustubha Govind
Kaustubha Govind 2011-5-18
  5 个评论
Jose Cruz
Jose Cruz 2021-3-2
Hello, im currently having the same issue as the above fellow. I use the command javaaddpath, with the path to the .class file which i want to call a method from, and it gives me the following error
>> javaaddpath('C:\testeTobii\bin\tobii\Tobii.class');
>> o = Tobii;
Unrecognized function or variable 'Tobii'.
I have already tried to insert the path on "classpath.txt" file and creating a java file "javaclasspath.txt" placing it inside the prefdir of Matlab.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Java Package Integration 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by