MATLAB: Do I receive errors when using the NetCDF Java package in MATLAB 7.2 (R2006a)

MATLAB

I am attempting to use the NetCDF Java packages from within MATLAB and while doing so I receive the following error:
Loading units database: com/mathworks/uk/units/Unit.xml
Fatal error: Could not open null
java.io.IOException: Could not open null
at com.mathworks.toolbox.mbc.units.UnitXML.urlToInputSource(UnitXML.java:547)
at com.mathworks.toolbox.mbc.units.UnitXML.toXdoc(UnitXML.java:151)
at com.mathworks.toolbox.mbc.units.UnitXML.getFromXML(UnitXML.java:114)
at ucar.units.StandardUnitDB.addFromXML(StandardUnitDB.java:173)
at ucar.units.StandardUnitDB.<init>(StandardUnitDB.java:115)
...

Best Answer

This issue is caused by and older version of the ucar.units package which is used by the Model-Based Calibration Toolbox.
To work around this issue you can remove mwucarunits.jar from your classpath as long as you do not use the Model-Based Calibration Toolbox which requires mwucarunits.jar. To do this, follow these steps:
1. Execute the following command at the MATLAB command prompt:
edit classpath.txt
2. Find the following line:
$matlabroot/java/jarext/mwucarunits.jar
and comment it out:
##$matlabroot/java/jarext/mwucarunits.jar
3. Save the file and restart MATLAB.