calling java class from external jar
    조회 수: 2 (최근 30일)
  
       이전 댓글 표시
    
Hello, I have linked an external jar file and after imported a class, I am trying to call some methods belonging to it.
By using methodsview I see the different methods that I can use but some of them look quite strange and I am not able to access. In particular, from methosview I see that the enumerartors belonging to the class are defined using the symbol $
classname$enumtype
and I cant understand how I can access to them.
Any clue?
thanks Paolo
댓글 수: 0
답변 (1개)
  Yair Altman
      
 2013년 10월 15일
        
      편집: Yair Altman
      
 2013년 10월 15일
  
      Here's one way to access Java enumerators:
msgType = javaMethod('valueOf','java.awt.TrayIcon$MessageType','INFO');
or:
enums = cell(javaMethod('values','java.awt.TrayIcon$MessageType'));
msgType = enums{3};  % 3=INFO
Yair Altman
댓글 수: 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!