I messed with the version of Java that I was using in Matlab and then I had some issues, so I tried to delete Matlab and all versions of Java from my machine then reinstall Matlab. According to,
Matlab already has java in it, so I assumed that the fresh install of Matlab would fix the issue. But it did not and I ended up having to install Java and point to it as per the article above just to get Matlab working with Java again.
The issues are these:
1. When I start up Matlab, I get
2. Sometimes it spools red errors and I have to shut Matlab off
3. I loose a lot of the interactive features, for instance; I cannot click on the folder ribon to move through the folders as:
3.b also, sometimes I cannot resize windows.
So, I lost some functionality. How can I run the version of Java that ships with the student version of Matlab?
Thanks!!

 채택된 답변

Mukul Rao
Mukul Rao 2015년 6월 25일
편집: Mukul Rao 2015년 7월 1일

0 개 추천

Hi, yes the cause of this issue appears to be the use of an incorrect JRE . Here is my recommendation - when MATLAB is shipped, the JRE used by the installed product is located in the directory (example for R2015a , win64):
C:\Program Files\MATLAB\R2015a\sys\java\jre\win64\jre
The JRE used by your current running instance of MATLAB can be determined by the output of the following command:
>> java.lang.System.getProperty('java.home')
Ideally, the output from the above command must point to the shipped JRE. I would recommend changing your MATLAB_JAVA environment variable to point MATLAB to use the shipped version of the JRE. This should resolve the issue.

댓글 수: 3

Huck Febbo
Huck Febbo 2015년 6월 26일
편집: Huck Febbo 2015년 6월 26일
Thank you for the advice, however it did not work for me.
These are the things that I tried: 1. Without my environmental windows variable pointing to the version of Java that I downloaded, I typed that command in the terminal and got: C:\Program Files\Java\jre1.8.0_45
( which is the verion of Java that the machine is running ( the one I downloaded and pointed to)). So, this does not give me any information about what I should point to to run Matlabs version of java
2a. When I run Matlab without it pointing to that version of Java I simply try to point to the Java folder inside the MATLAB folder (shown in picture below) ( Matlab starts up without Java). Like this
and that gives the window that you see on the left of the picture about (MATLAB is running without Java). Then I type the command and get:
2b. When I point the MATLAB (as you suggested) as:
It gives the same result as 2a....
So, it does not work.
it says to point the the parent directory of rt.jar and that is what I did to get it to work for the other version of Java. But, I looked for the rt.jar file in all of the subfolders of the Java folder (within MATLAB) and I was unable to locate it.
So, is there a file or (.jar) that I need to be pointing to it's parent directory to get MATLABs verison of JAVA to work?
Thanks!
Mukul Rao
Mukul Rao 2015년 6월 26일
편집: Mukul Rao 2015년 6월 26일
I'll get back to you on this if possible but the jre is shipped in this directory typically (example for R2015a , win64):
C:\Program Files\MATLAB\R2015a\sys\java\jre\win64\jre
Huck Febbo
Huck Febbo 2015년 6월 30일
This worked! Thanks!!!

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

추가 답변 (1개)

Francisco Munoz Grandjean
Francisco Munoz Grandjean 2020년 11월 26일

0 개 추천

I have the same problem with Matlab. But I'm using Linux Mind, could someone help me?

카테고리

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

태그

질문:

2015년 6월 24일

답변:

2020년 11월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by