When use matlab hitting "Java VM" error or warning, you could attempt to do as follows:
# matlab -nojvm
So, won't hit java VM error or warning for ever.
Such as:
# cat /home/vrlab/java.log.26115
Operating System: Linux 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64
Processor ID: x86 Family 6 Model 45 Stepping 7, GenuineIntel
Host Name: vrlab-g727
Java HotSpot(TM) 64-Bit Server VM warning: Attempt to deallocate stack guard pages failed.