I upgraded Linux and MATLAB didn't work.
saw errors like:
Warning: Disabling Java support.
But, after much searching and reading this newb got it to work.
if you need to matlab up fast and don't mind text mode only
enter the following at the prompt:
If you like the GUI of matlab and want to undertake the
challenge (for newbies like me) of resurrecting it read on
The errors on attempting to run MATLAB 12.1 student version on Fedora Core2
were really frustrating. I got warnings about GLIBC_2.0 and the Java Runtime Evironment.
Also I had problems with linking the java libraries. Basically, many things that I didn't
fully understand. But, I now have MATLAB working in gui mode and it doesn't keep crashing
when I open new windows and that sort of thing (as others have reported).
I combined the steps from several different postings on users groups (searched:mathworks/LQ/google)
This one was really helpful from Jakub at bugzilla.redhat.com
posted 11/21/2003 Bug # 110610
Try using some less buggy JVM.
Latest Sun JDK should work just fine for example.
Or, as a workaround for the buggy JVM, you can try:
gcc -O2 -shared -o ~/libcwait.so -fpic -xc - <<\EOF
__libc_wait (int *status)
asm volatile ("pushl %%ebx\n\t"
"movl %2, %%ebx\n\t"
"movl %1, %%eax\n\t"
: "=a" (res)
: "i" (__NR_wait4), "0" (WAIT_ANY), "c" (status), "d" (0),
and run the program with
I copied and pasted the gcc -02 ...
(don't ask me to explain that code I just ran it)
(make sure you are su when you run it, though)
(I think the code makes a file that stops matlab
from choking on not finding the clibrary until after
it knows which java environment is active)
and then typed the following at the prompts:
Then I typed matlab and I was happy to see the GUI load properly,
but sad if I opened a .m file in its editor
MATLAB crashed. This is a big problem.
What Jakub didn't know and poster David Kewley (2/19/04 same thread) did
is that MATLAB 12.X doesn't play nice with Sun Java version 1.4.2. And this
libcwait.so file above could be a good fix for RH8 but not for versions that
used most recent versions of Java. When I did just this fix - I got that
crash problem when opening other windows.
So, I was looking at another posting this time from the Mathworks site.
(solution number 1 -1 AFHN) which suggested to get the 1.3 version of Java
and install that and then have MATLAB link to this version
ln -s /where-you-install-blackdownjava/j2se/1.3/jre /local-matlab-dir/sys/java/jre
(of course replace the hyphenated directories with your particular directories)
I did not change the environment variable like the rest of that mathworks post said.
do not type this part: (export MATLAB_JAVA=/path-to-blackdown-java/jre)
I guess that I made MATLAB "think" its using an older kernel version (2.4.19) with
a newer Java version (with appropriate C libraries). While, avoiding forcing MATLAB
to use the latest Java version which can crash the MATLAB GUI. delicate program, eh?
I have opened and closed MATLAB several times even logged out and back on and it still works
I think it stuck. now, i just have to make a shell script to run matlab that contains the following three lines and always use that script to run matlab.
good luck, don't give up. I got help from using the search at LQ and other places.
a bigger newb than you trust me.