MATLAB: Parfor error after compiled

compilerparallel computingparfor

I am testing parfor using a simple code as below
— matlabpool open 2; parfor i = 1:10 display(i); end matlabpool close;
It does not work after compiled and gives the following error. Does anyone have an idea on this? Thanks for your help
— Starting matlabpool using the 'local' configuration … connected to 2 labs. ??? The class "distcomp.remoteparfor" is undefined. Perhaps Java is not running.
Error in ==> parallel_function at 430
Error in ==> Untitled at 3
MATLAB:subscripting:undefinedClass

Best Answer

What is the command line you are using to launch the application?
Can you validate the local configuration successfully (Parallel > Manage Configurations > select local > validate)
If you run the code in MATLAB, does it work?