Error Java exception occurred: Matlabstan

rats examples in Matlabstan, I have added path of MatlabStan- ankd MatlabProcessManager-master
file code run >>> rats.m

My system

  • Operating System: Windows 10 64Bit
  • CmdStan Version: 2.24.1
  • Compiler/Toolkit: Mingw64

related to my issue is from >>> (and Yes i have no space on my folder directory) also >>> Jimmy Xia fixed this by changing to CmdStan2.17.1 (I tried this but does not work)

The error i obtained are:
Error using processManager/start (line 366)
Java exception occurred: Cannot run program “C:\Users\Patrick\Desktop\BlackboxKLVI\cmdstan-2.24.1\bin\stanc” (in
directory “C:\Users\Patrick\Desktop\BlackboxKLVI”): CreateProcess error=2, The system cannot find the file

at java.lang.ProcessBuilder.start(

at java.lang.Runtime.exec(

at java.lang.Runtime.exec(

Caused by: CreateProcess error=2, The system cannot find the file specified

at java.lang.ProcessImpl.create(Native Method)

at java.lang.ProcessImpl.<init>(

at java.lang.ProcessImpl.start(

at java.lang.ProcessBuilder.start(

... 2 more

Error in processManager/set.command (line 216)

Error in processManager (line 181)
self.command = p.Results.command;

Error in StanModel/stan_version (line 843)
p = processManager(‘id’,‘stanc version’,‘command’,command,…

Error in StanModel (line 196)
ver = self.stan_version();

Error in stan (line 108)
model = StanModel();

Error in rats (line 20)
fit = stan(‘file’,‘rats.stan’,‘data’,rats_dat,‘verbose’,true);

In addition to this i tried code stanc --version on windows 10’ CMD

Update! I have managed to run Stan from CMD windows 10 64 bits already but somehow in matlab it throws an error saying :

Having a problem getting stan verssion.
THis is likely a problem with Java running out of file descriptors.
Trying again…
Giving up…
Error using cellfun
Non-scalar in Uniform output, at index 1, output 1.
Set ‘UniformOutput’ to false.

and it shows nothing apart from stanc is not recognized as an internal or external command, operable program or batch file. I have no idea why.
Any help would be appreciated!

Thanks,… Patt

Glad you got Stan running but sorry it’s not working via Matlab. Unfortunately not many of us here know much Matlab, so hopefully @brian-lau will see this or maybe @avehtari will have an idea (Aki, not sure if you still use Matlab at all, I just remember you used to be familiar with MatlabStan more than other people). Or maybe @rok_cesnovar will have an idea since he seems to know a lot of languages and is good at troubleshooting these kinds of issues.

Sorry, can’t help. I’ve stopped using Matlab and not even sure if I can get it running anymore.

someone else reported the same sequence of errors w/ matlab (once they got past CmdStan install problem) - Cmdstan Installation

if MatlabStan is no longer working/maintained, we need to note this.