IM2JAVA2D is not available on this platform

7 views (last 30 days)
Zhang
Zhang on 28 Dec 2013
Edited: Yair Altman on 29 Dec 2013
Background: Ubuntu 12.04 Server. No GUI. MCR 2012. I'm running a matlab-based java program. The java I use is OpenJDK.
In details, the error is:
Error using im2java2d (line 80) IM2JAVA2D is not available on this platform.
Error in getBlockSegmentByFile (line 50)
Error in manualMain (line 151)
Exception in thread "main" ... Matlab M-code Stack Trace ...
file /root/.mcrCache7.17/autoBl1/toolbox/images/images/im2java2d.m, name im2java2d, line 80.
file /root/.mcrCache7.17/autoBl1/helper/getBlockSegmentByFile.m, name getBlockSegmentByFile, line 50.
file /root/.mcrCache7.17/autoBl1/autoBlockJav/manualMain.m, name manualMain, line 151.
com.mathworks.toolbox.javabuilder.MWException: Error using im2java2d (line 80)
IM2JAVA2D is not available on this platform.
at com.mathworks.toolbox.javabuilder.internal.MWMCR.mclFeval(Native Method)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.access$600(MWMCR.java:23)
at com.mathworks.toolbox.javabuilder.internal.MWMCR$6.mclFeval(MWMCR.java:833)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.mathworks.toolbox.javabuilder.internal.MWMCR$5.invoke(MWMCR.java:731)
at com.sun.proxy.$Proxy0.mclFeval(Unknown Source)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.invoke(MWMCR.java:406)
at autoBlockJava.manualMain.manualMain(manualMain.java:268)
at autoblock.AutoBlock.main(AutoBlock.java:37)

Answers (1)

Yair Altman
Yair Altman on 29 Dec 2013
Edited: Yair Altman on 29 Dec 2013
im2java2d is only available on platforms that run Java GUI (Swing); yours doesn't

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!