Problem with maximizing figure window in MATLAB 2016a

After maximizing figure in MATLAB 2016a on my Linux machine, the figure window behaves weirdly. Mouse actions happen somewhere other than where they are intended to. Any idea? Attaching are the examples: zooming-in and selecting options.

댓글 수: 4

Have you ever found an answer for this problem?
I have experienced this problem too. Could you solve it in the meantime?
Hey, Just wanted to say I also experience the same problem. In my case it is not only on figures, but with the main window as well, if I maximize it. which Linux Distro are you using? I noticed it happens only on GTK3 based DEs, like Cinnamon or Gnome (I guess Unity should be on the list as well), but I dont remember this happening with KDE Plasma desktop
Well, I submitted a bug report to Matlab and it turned out that some versions of Java doesn't play well with GTK due to some sort of bug in java. so changing the command to start matlab with the system java version solved the problem from me. the following I adopted from Arch wiki
MATLAB_JAVA=/usr/lib/jvm/java-7-openjdk/jre matlab
I tried both java-7-openjdk and java-8-openjdk, in both cases the issue disappeared

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

 채택된 답변

svooo
svooo 2017년 8월 8일
As I mentioned in the comment, the problem is that some versions of java don't play well along gtk. in my case using the system java instead of the default java that comes with Matlab solves the issue. to start from the terminal you can use a command specified in the previous comment, otherwise you can modify the matlab.desktop file, by changing the exec line to the following
Exec=env MATLAB_JAVA=/usr/lib/jvm/java-7-openjdk/jre matlab -desktop

댓글 수: 1

Thank you very much for the answer. It solved the problem.

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

추가 답변 (1개)

Mahaveer Jain
Mahaveer Jain 2019년 3월 25일

0 개 추천

The above solution work but in case if you get error at startup, you can use oracle Java (/usr/lib/jvm/oracle_jdk8) which I felt better experience than openjdk.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

질문:

2016년 7월 1일

답변:

2019년 3월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by