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.

Answers (1)

Image Analyst
Image Analyst on 10 Sep 2012
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 Comments

"mcrinstaller" is a MATLAB function that returns the location of MCRInstaller.exe - this is probably what the OP is trying to do.
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.
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.
"all toolboxes installed" does not mean they are licensed. Try
which -all mcrinstaller
I suspect it will tell you that you have no license.
with
which -all mcrinstaller
it returns:
'mcrinstaller' not found.
Builder JA depends upon MATLAB Compiler; do you have MATLAB Compiler installed?
by "ver" command it not returns MATLAB Compiler. It means that M.C. is not installed, is it? :(
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 on 12 Sep 2012
Edited: cyberdyne on 12 Sep 2012
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
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)
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/
Try
!javac -version
It works!
but maybe !javac command emulates OS command javac
Have not I to get something writing javac in matlab command window?
!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.
So, have I to use !javac commands and never javac (in command window) ?

Sign in to comment.

Categories

Products

Asked:

on 10 Sep 2012

Community Treasure Hunt

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

Start Hunting!