Why does the contents of javaclasspath.txt not get added to the static class path when I double-click on an M-file to start MATLAB 8.1 (R2013a)?

3 views (last 30 days)
When I start MATLAB by double-clicking on a MATLAB shortcut icon, the path given in javaclasspath.txt gets added to the static path. But if I start MATLAB by opening an M-file, this path does not get added.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Oct 2013
The following conditions apply depending on where you place the javaclasspath.txt:
1. If javaclasspath.txt is placed in the startup folder or the preferences folder and MATLAB is started by clicking on a shortcut (MATLAB icon), the contents of javaclasspath.txt will be loaded.
2. If javaclasspath.txt is placed in the startup folder (not in the preferences folder) and MATLAB is started by clicking on an M-file, the contents of javaclasspath.txt will not be loaded.
3. If javaclasspath.txt is placed in the preferences folder (not in the startup folder) and MATLAB is started by clicking on an M-file, the contents of javaclasspath.txt will be loaded.
The preferences folder location can be found using the following command at the MATLAB prompt:
prefdir
Place your javaclasspath.txt file in that folder and when you click on an M-file (that then loads MATLAB) you should see the contents of javaclasspath.txt on the static class path.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2013a

Community Treasure Hunt

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

Start Hunting!