[Solved] "Error: Could not find or load main class org.brainstorm.RunCompiled" with compiled brainstorm

First,I compiled BST using the command 'brainstorm compile' on Windows10. Then, I copied the produced bst_bin_R2022b_230314.zip to centos7 system. I got an error when I run './brainstorm3.command /usr/local/MATLAB/MATLAB_Runtime/v913/ run.m local' for testing like that:

Please wait...

If it hangs for more than a few minutes: try pressing ENTER.
Alternatively, download Brainstorm for a different version of the Matlab Runtime.
(See the installation instructions on the Brainstorm website)

Error: Could not find or load main class org.brainstorm.RunCompiled

I just tested 'bst_bin_R2022b_230130.zip' downloaded from the bottom of https://neuroimage.usc.edu/bst/download.php, but there still existed an error:
2

Error: Could not find or load main class org.brainstorm.RunCompiled

This means that the compilation process did not finish correctly.
Fix your scripts, run the compilation again, then try to execute it on the computer where it was compiled before copying it anywhere else.
If you compile with Matlab 2022b, you don't need to install the Runtime 9.13, it would use the existing install of Matlab.

I just tested 'bst_bin_R2022b_230130.zip' downloaded from the bottom of https://neuroimage.usc.edu/bst/download.php , but there still existed an error:

The error "Dot indexing is not supported..." is comping from your script, not from Brainstorm.
You need to fix your script first. Make it work on your full Matlab install before trying to make it work in a compiled environment.

I'd also recommend you start by trying to compile and run a non-modified version of Brainstorm before trying to make your custom scripts work, at least to rule out any possible error that are strictly related to your compilation environment.

Thanks for your reply. By the way,I modified the bst_compile.m during the compilation to fix a bug.
image

Is there something wrong with what I did?

Sorry,I have figured out what went wrong. I modified as follows:

system(['cd /D "' jarDir '" ' cmdSeparator ' "' JdkDir, jarExePath '" cmf manifest.txt "' bstJar '" bst_javabuilder_' ReleaseName(2:end) ' org com']);

'/D' saved me. :smiley: