Issue with Server Java files(?) - unable to launch R2013b with JRE7 on Win 7 x64

5 views (last 30 days)
My system is running Windows 7 x64 and I have JDK 7u51 AND JRE 7 update 51 (latest) installed in the standard directory on my C:\ partition.
Everything started when i got the "Failure Loading Desktop Class" error specified in the following answer upon trying to launch MATLAB: http://www.mathworks.com/matlabcentral/answers/92929
So I followed the instructions given there - tried running from the bin folder to no avail and then added an Enviroment Variable as instructed.
Variable name: MATLAB_JAVA , Variable value: C:\Program Files (x86)\Java\jre7 (also tried x64 java files from "program files" w/o "(x86)")
However, this gave me a NEW error upon startup of MATLAB: "Warning: Unable to find Java library: C:\Program Files (x86)\Java\jre7\bin\server\jvm.dll Please check if you have a MATLAB_JAVA environment variable. Note that MATLAB requires Java version 1.4 or higher."
I checked my Java directory and it turns out I don't have a "jre7\bin\server" folder at all. There's the "bin\client" folder with a similiar file though.
So I downloaded "Server Java" files which comes with the JDK package. Only - when i try to launch MATLAB with the environment variable set to JDK directory it gives me the ol' "Failure Loading Desktop Class" again.
Finally I tried copying the "bin\server" folder from JDK to JRE7 - and then MATLAB crashes half a second after showing the splash screen, giving no errors. (Tried both using x64 and x86 versions of Jre folders)
What am I doing wrong? Thanks for any help you can provide!
  5 Comments
Jason
Jason on 20 Apr 2017
I just had the same problem, and was able to fix it. This may not work for others, but here's what happened to me. When I went to install Java, the java website's default was to install 32-bit (which installs in the Program Files (x86) folder). However, the matlab version I'm using (R2015b) appears to be 64-bit. In Matlab, you can type
computer('arch')
to find out what your version you're using. So, back on the Java download page, I had to follow the "See all Java downloads" link and get the 64-bit version (which is apparently NOT the default). This installed into the Program Files directory. I changed MATLAB_PATH to point to this version and everything works.
Unfortunately, I don't have any insight into the "Failure Loading Desktop Class" error, sorry!

Sign in to comment.

Answers (0)

Categories

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

Products

Community Treasure Hunt

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

Start Hunting!