mcrinstaller function doesn't work

Hi,
when I write in the command mcrinstaller it returns:
Undefined function or variable 'mcrinstaller'.
I check matlab path settings and JA builder is in it.
How is it possible?
EDIT: Running Matlab builder JA (Start->MATLAB->MATLAB Builder JA->Deployment Tool(deploytool)) it doesn't work.

回答 (1 件)

Image Analyst
Image Analyst 2012 年 9 月 10 日

0 投票

What does "ver" report? Do you have the MATLAB Compiler? Why are you trying to execute the run time library installer from the command window anyway? It should be run from Windows Explorer or something. If for some reason you did want to install it from within MATLAB, you'd have to prefix mcrinstaller with an exclamation point, like you do with any executable you want to launch from the command line, but I don't recommend that you do it from there.

17 件のコメント

Kaustubha Govind
Kaustubha Govind 2012 年 9 月 10 日
"mcrinstaller" is a MATLAB function that returns the location of MCRInstaller.exe - this is probably what the OP is trying to do.
cyberdyne
cyberdyne 2012 年 9 月 10 日
Well, ver returns all toolbox installed (within MATLAB Builder JA); I had to try to convert a matlab program in a stand-alone application, but...does it not very strange that it returns Undefined function or variable 'mcrinstaller'.? I've same problem with deploytool as I wrote above.
Image Analyst
Image Analyst 2012 年 9 月 11 日
I'm not familiar with Builder JA. I use "MATLAB Compiler" to build my programs/scripts into stand alone executables. Looks like you don't have that.
Walter Roberson
Walter Roberson 2012 年 9 月 11 日
"all toolboxes installed" does not mean they are licensed. Try
which -all mcrinstaller
I suspect it will tell you that you have no license.
cyberdyne
cyberdyne 2012 年 9 月 11 日
with
which -all mcrinstaller
it returns:
'mcrinstaller' not found.
Walter Roberson
Walter Roberson 2012 年 9 月 11 日
Builder JA depends upon MATLAB Compiler; do you have MATLAB Compiler installed?
cyberdyne
cyberdyne 2012 年 9 月 11 日
by "ver" command it not returns MATLAB Compiler. It means that M.C. is not installed, is it? :(
Image Analyst
Image Analyst 2012 年 9 月 12 日
Try running this code:
% Print out licenses that have been used (checked out) to the command window.
license('inuse');
% Check that user has the Compiler Toolbox in use.
hasToolbox = license('test', 'compiler')
if hasToolbox
message = sprintf('You have the MATLAB Compiler installed, licensed, and checked out.');
else
% User does not have the toolbox license checked out yet.
% User may have the compiler installed,
% but it they haven't used any of the functions from it,
% or somehow otherwise checked it out, then it won't show up.
% Or they may simply not have the compiler at all.
message = sprintf('Either you do not have the MATLAB Compiler,\nOR you may have it but have not used it yet.\nPlease type mcc on the command line, and try this test again.');
end
uiwait(msgbox(message));
cyberdyne
cyberdyne 2012 年 9 月 12 日
編集済み: cyberdyne 2012 年 9 月 12 日
I re-installed matlab and I tried that code and It retuns now:
matlab compiler installed, licensed and checked out
Now deploytool works. Thanks
but now after I setted environment variable as JAVA_HOME with Java jdk path (1.6) but javac -version command, in command window doesn't work; getenv JAVA_HOME works
Image Analyst
Image Analyst 2012 年 9 月 12 日
"retuns"?
cyberdyne
cyberdyne 2012 年 9 月 14 日
writing javac -version returns:
Undefined function 'javac' for input arguments of type
'char'.
while getenv JAVA_HOME retuns : C:\Program Files\Java\jdk1.6.0_35\bin (path with java.exe) I've tried to set JAVA_HOME variable in C:\Program Files\Java\jdk1.6.0_35\ but in DOS prompt doesn't return nothing (as wrong command)
Image Analyst
Image Analyst 2012 年 9 月 14 日
Your compiler now works and you're now having some kind of system problem with an Environment variable. Is that a MATLAB problem? If you think it is, call the Mathworks. http://matlab.wikia.com/wiki/FAQ#During_installation.2C_MATLAB_crashes.2C_hangs.2C_gives_an_error_message_or_otherwise_does_not_install_correctly. Or try Yair Altman's web site http://undocumentedmatlab.com/
Walter Roberson
Walter Roberson 2012 年 9 月 14 日
Try
!javac -version
cyberdyne
cyberdyne 2012 年 9 月 15 日
It works!
cyberdyne
cyberdyne 2012 年 9 月 17 日
but maybe !javac command emulates OS command javac
Have not I to get something writing javac in matlab command window?
Walter Roberson
Walter Roberson 2012 年 9 月 17 日
!javac creates an OS command shell to execute javac, and all the environment variables in effect will be copied to the command shell.
javac in the command window would attempt to execute a MATLAB routine named "javac", but there does not happen to be a routine with that name.
cyberdyne
cyberdyne 2012 年 9 月 17 日
So, have I to use !javac commands and never javac (in command window) ?

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

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

タグ

質問済み:

2012 年 9 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by