Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deactivate MEvent.CASE in Java IDEs

Tags:

I'm using MATLAB R2014a on my laptop running Ubuntu 14.04 LTS, and am experiencing a rather annoying issue. Whenever I use the two-finger scrolling gesture on my touchpad in either the editor or the main window, the following output appears in the command window:

MEvent. CASE!

While the scrolling works, this line is output over and over again as I continue to perform the gesture.

Any ideas for how to stop this from happening?

NOTE: It also occurs in Processing and Arduino IDEenter image description here

like image 511
Juan David Avatar asked Jul 07 '14 12:07

Juan David


2 Answers

As a user I wouldn't want to type the above command everytime I open MATLAB. So I searched a bit on matlab 'startup' command line section, and the 'search path' section. I solved my problem after doing the following simple steps:

  1. See your userpath by typing userpath in MATLAB console: For linux it is: home/username/Documents/MATLAB/
  2. Create a file 'startup.m' having only one line, which will disable Mevent.CASE! (Below is the text to copy)

    !synclient HorizEdgeScroll=0 HorizTwoFingerScroll=0
    
  3. Place the created startup.m file in your userpath folder as defined in MATLAB.

  4. Now as soon as you place this file in your userpath, restart MATLAB.
  5. Verify by seeing ans = 0 in the workspace section.

It worked for me on Ubuntu 15.04 running MATLAB R2015b, I hope it works for you all as well.

Note: This is an improvement to @someDude and @Slothworks answer.

like image 75
Arjun Varshney Avatar answered Oct 04 '22 06:10

Arjun Varshney


None of these solutions worked for me. Moreover I like to keep the two finger scrolling. This works for me:

MATLAB relies on jdk7, jdk8 will not work with it. It appears 16.04 and later no longer provide openjdk-7-jre in the repos, and it must be installed from external sources. To install it:

sudo add-apt-repository ppa:openjdk-r/ppa  
sudo apt-get update   
sudo apt-get install openjdk-7-jdk

Ensure that you have correctly set the MATLAB_JAVA variable. This can be checked with:

echo $MATLAB_JAVA

If the output is empty, this variable is empty. It can be set with

export MATLAB_JAVA=/usr/lib/jvm/java-7-openjdk-amd64/jre

Then, execute MATLAB from the same shell with whatever command you use to call MATLAB, usually

matlab

In the MATLAB command window, run

version -java

and verify that the output contains "OpenJDK". If all is successful, you should no longer see the MEvent. CASE! error message.

To make this persistent: add

export MATLAB_JAVA=/usr/lib/jvm/java-7-openjdk-amd64/jre        

to the /etc/profile file (for system wide change) or to ~/.profile for local user

Source: https://www.reddit.com/r/matlab/comments/5anydi/how_to_stop_mevent_case_from_appearing/

like image 28
newman_ash Avatar answered Oct 04 '22 07:10

newman_ash