Unexpected behavior of -nouserjavapath in MATLAB R2025b compared to R2022b
Hello everyone,
I recently upgraded from MATLAB R2022b to MATLAB R2025b and noticed a change in how MATLAB handles the -nouserjavapath startup option.
I have a javaclasspath.txt file in my MATLAB prefdir, where I define several custom JAR file locations. Normally, when MATLAB starts, these JARs are correctly loaded into the static Java class path (visible via javaclasspath(‘-static’)).
In some situations, however, I want to start MATLAB without loading my custom JARs. In R2022b, starting MATLAB with:
matlab -nouserjavapath
correctly ignored the javaclasspath.txt, and my custom JARs did not appear in the static Java class path.
But in R2025b, this no longer works. Even when starting with -nouserjavapath, MATLAB still loads the JARs defined in javaclasspath.txt.
Has something changed in MATLAB R2025b regarding how the -nouserjavapath option is handled?
Is this expected behavior, a known change, or possibly a bug?
Thank you!Hello everyone,
I recently upgraded from MATLAB R2022b to MATLAB R2025b and noticed a change in how MATLAB handles the -nouserjavapath startup option.
I have a javaclasspath.txt file in my MATLAB prefdir, where I define several custom JAR file locations. Normally, when MATLAB starts, these JARs are correctly loaded into the static Java class path (visible via javaclasspath(‘-static’)).
In some situations, however, I want to start MATLAB without loading my custom JARs. In R2022b, starting MATLAB with:
matlab -nouserjavapath
correctly ignored the javaclasspath.txt, and my custom JARs did not appear in the static Java class path.
But in R2025b, this no longer works. Even when starting with -nouserjavapath, MATLAB still loads the JARs defined in javaclasspath.txt.
Has something changed in MATLAB R2025b regarding how the -nouserjavapath option is handled?
Is this expected behavior, a known change, or possibly a bug?
Thank you! Hello everyone,
I recently upgraded from MATLAB R2022b to MATLAB R2025b and noticed a change in how MATLAB handles the -nouserjavapath startup option.
I have a javaclasspath.txt file in my MATLAB prefdir, where I define several custom JAR file locations. Normally, when MATLAB starts, these JARs are correctly loaded into the static Java class path (visible via javaclasspath(‘-static’)).
In some situations, however, I want to start MATLAB without loading my custom JARs. In R2022b, starting MATLAB with:
matlab -nouserjavapath
correctly ignored the javaclasspath.txt, and my custom JARs did not appear in the static Java class path.
But in R2025b, this no longer works. Even when starting with -nouserjavapath, MATLAB still loads the JARs defined in javaclasspath.txt.
Has something changed in MATLAB R2025b regarding how the -nouserjavapath option is handled?
Is this expected behavior, a known change, or possibly a bug?
Thank you! matlab 2025b, matlab 2022b, startup option, -nouserjavapath MATLAB Answers — New Questions









