Supported and compatible compilers page Release 2012a

Hi,
Looking this page:
I've used that Java-jdk link but its version is 1.7 and (not 1.6) and I've installed that.
So...have I to install 1.6? Can I hold both versions?
thanks

回答 (1 件)

Titus Edelhofer
Titus Edelhofer 2012 年 9 月 11 日

1 投票

Hi Alessandro,
both questions: yes. ;-) Yes, you have to install 1.6, java 1.7 and MATLAB don't work well together (yet). And yes, you can have both of them in parallel on your machine. You should set in Windows the environment variable JAVA_HOME to point to the jdk1.6
Titus

6 件のコメント

cyberdyne
cyberdyne 2012 年 9 月 11 日
編集済み: cyberdyne 2012 年 9 月 11 日
Ok, thanks
Have I to do somewhat to set JDK 1.6 in the command windows of matlab (somewhat like the mex -setup command for Visual C++ to set C++ compiler) ? How can I check that matlab have a right JDK?
Titus Edelhofer
Titus Edelhofer 2012 年 9 月 13 日
No, the Builde JA looks at the JAVA_HOME environment variable, if available, otherwise just calls javac (so the first javac.exe on the Windows Path). To be sure call in MATLAB
getenv('JAVA_HOME')
to see if the environment variable is set, otherwise you might set in MATLAB (but only for this session, or put in startup.m)
setenv('JAVA_HOME', 'C:\PathToYourJDK1.6')
Titus
cyberdyne
cyberdyne 2012 年 9 月 16 日
setenv('JAVA_HOME', 'C:\PathToYourJDK1.6')
or:
setenv('JAVA_HOME', 'C:\PathToYourJDK with javac.exeFolder') ???
Walter Roberson
Walter Roberson 2012 年 9 月 17 日
In the apostrophes put the path to the folder that java 1.6 is installed in.
Titus Edelhofer
Titus Edelhofer 2012 年 9 月 17 日
No, the JAVA_HOME should point to the main folder (not the bin folder), e.g., "C:\Program Files\java\jdk1.6.0_23" ...
Titus
cyberdyne
cyberdyne 2012 年 9 月 17 日
ok And the PATH and CLASSPATH variables?
I setted env. variable like...
JAVA_HOME to C:\Program Files\Java\(JDK 1.6.0.35Folder)\bin ('cause javac.exe is in there)
PATH to C:\Program Files\Java\jdk1.6.0_35\bin;C:\Program Files\OpenNI\Bin64;C:\Program Files\PrimeSense\NITE\bin64;C:\Program Files\MATLAB\R2012a\runtime\win64;C:\Program Files\MATLAB\R2012a\bin;C:\Program Files\MATLAB\MATLAB Compiler Runtime\v717\runtime\win64 (openNI and NITE are library that I need to work with MSKinect)
I have not CLASSPATH env. variable for now

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeDeploy to Java Applications Using MWArray Data API についてさらに検索

質問済み:

2012 年 9 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by