필터 지우기
필터 지우기

Accessing a signature Class in Java

조회 수: 2 (최근 30일)
Sanchay Tiwari
Sanchay Tiwari 2017년 5월 16일
답변: Manish Annappa 2017년 5월 19일
So while converting the Matlab code into a java package there is the main class in java which in my case in class1 and it is accessing a signature class in it called pmdiagramsignature. Now if I try to create a new class called GUI_Class where I am creating a GUI in java and when I am trying to access the Class1 through GUI_Class, it is not providing me an access to the PMdiagramsinature?

답변 (1개)

Manish Annappa
Manish Annappa 2017년 5월 19일
I am assuming that you have your MATLAB code in a function called ‘func1’. Additionally, you have a MATLAB class ‘pmdiagramsignature’ being accessed by ‘func1’. You are trying to compile ‘func1’ into Java library, that results in a JAR file (let’s call it test.jar) containing the main class ‘Class1’. ‘GUI_Class’ is the driver class used to call the library test.jar.
To access methods present in ‘pmdiagramsignature’ from ‘GUI_Class’, instantiate ‘pmdiagramsignature’ in ‘func1’ and call required methods.
If you are not looking for a workflow like above, to suggest an alternate solution, explain your intended workflow along with the details of what ‘pmdiagramsignature’ class is and how it is called in the MATLAB function (which is being compiled).

카테고리

Help CenterFile Exchange에서 Call Java from MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by