Usin third party java classes in compiled gui

조회 수: 1 (최근 30일)
David Rising
David Rising 2016년 12월 13일
댓글: Swarup 2017년 5월 15일
Hello Matlab Community! So I have started using third party java classes inside my gui development which I then compile and distribute internally at my company for others to use. Everything runs fine inside the uncompiled code but the compiled code can't seem to find the appropriate class. In my code I specify the dynamic java path to the folder in which I have placed the class file and am using the '-v1' output from that function to show me which paths are being added. This output doesn't come up in the compiled version. So, to break it down:
1. I have my class in a subdirectory of the main directory where the target file is
2. In my code I use the javaclasspath function to specify this subdirectory (this works in the uncompiled version)
3. In the compiler I have tried -I and specifying the directory and -a and specifying the class file specifically but I always get the same error when I try to start the program: Undefined function 'LookupFieldCellEditor' for input arguments of type 'java.util.Hashtable'. (So now you know which class I am using! :) )
Any thoughts? Does javaclasspath not worked on deployed programs? I haven't found anything in the javaclasspath documentation about using it in deployed applications, but then again, I may have simply overlooked something. Thanks!
  댓글 수: 1
Swarup
Swarup 2017년 5월 15일
Same problem as above. After I used the isdeployed switch but endup getting the same error as mentioned by David.
Any pointers please..
if true
if ~isdeployed
javaaddpath('LookupFieldCellEditor.zip')
else
jpth = 'LookupFieldCellEditor.zip';
javaclasspath(jpth);
end
end

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

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