Why do I see a "java.lang.NullPointerException" in the installation log when trying to install a support package?
7 views (last 30 days)
Show older comments
MathWorks Support Team
on 13 Mar 2018
Edited: MathWorks Support Team
on 30 Jul 2018
When trying to install a support package, the installation fails with the following error in the installation log:
java.lang.NullPointerException
Towards the beginning of the installation attempt, the log also contains:
Installation folder: null
Accepted Answer
MathWorks Support Team
on 30 Jul 2018
Edited: MathWorks Support Team
on 30 Jul 2018
The support package installation folder is not set or cannot be retrieved for some reason. The installation folder is saved in $MATLAB/toolbox/local/supportpackagerootsetting.xml. The file may not exist, not have read permissions or be invalid.
Run the following command to see if any errors are returned:
>> matlabshared.supportpkg.getSupportPackageRoot
Run the following to set an installation folder, then run the above again to verify if the folder was set properly:
>> matlabshared.supportpkg.setSupportPackageRoot('path_to_writable_location')
Replace "path_to_writable_location" with a valid path. Common locations are:
- Windows: C:\ProgramData\MATLAB\SupportPackages\<release>
- Linux: /home/<user>/Documents/MATLAB/SupportPackages/<release>
- Mac: /Users/<user>/Documents/MATLAB/SupportPackages/<release>
Alternatively, setting the contents of supportpackagerootsetting.xml to the following should work on all platforms:
<?xml version="1.0" encoding="UTF-8"?>
<SupportPackageRootSettings>
<Setting name="sproot">__DEFAULT__</Setting>
</SupportPackageRootSettings>
0 Comments
More Answers (0)
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!