im2java2d, two *identical* PCs, works on one not on another
조회 수: 1 (최근 30일)
이전 댓글 표시
Good morning,
I'm having a bit of trouble using my code (that includes calling the im2java2d function) on a different computer than I developed it on. The weird part is that I can't tell how the two PCs differ in their setup to cause this problem.
Both PCs are running ubuntu 12.04, and matlab r2012a.
On the problematic PC, the error"
Error using im2java2d (line 80)
IM2JAVA2D is not available on this platform.
is returned.
Line 80 error is thrown because this conditional (below) is found to be true on the troubled machine.
if ~IsJavaAvailable
error(message('images:im2java2d:im2java2dNotAvailableOnThisPlatform'));
end
Interestingly, I made a copy of the im2java2d function and commented lines 79-81, and the function progresses as expected and returns the proper output.
What is going wrong to cause this error to be thrown?
Thanks, Brian
p.s. I should perhaps make note that I am running matlab on the problematic machine via command line (matlab -nodisplay) through an ssh and gnu-screen session, because this machine is remote from where I typically work.
EDIT: it seems that the restriction is using this function via command line. Can someone please explain why not all java functions are available via command line?
댓글 수: 1
Gonzalo Garateguy
2013년 10월 4일
I think it has to do with the desktop, I had the same problem but if you start matlab with -nodisplay because there are some java classes that are not available I start doing it with -nodesktop instead and everyting worked fine.
If you can do x11 tunneling to the server you can even launch matlab with the desktop but it will be painfully slow.
other option is to set the display to the local display of the server before starting matlab with
% setenv DISPLAY localhost:0.0 and then % matlab -nodesktop
Hope it helps
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Java Package Integration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!