This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Adityarajsingh Santokhee wrote:
you have a class path problem i guess, since ucar.unidata.io.RandomAccessFile is in the jar fileHello,I am getting 2 error messages: 1. when trying to open a netcdf file /home/ads/gads_temp/src/uk/ac/nercessc/gads/datarequest/datareader/CDFDataReader.java:50:cannot access ucar.unidata.io.RandomAccessFile file ucar/unidata/io/RandomAccessFile.class not found NetcdfFile ncFile = NetcdfFile.open(filename); I browsed through the mail archives and found a similar problem: http://my.unidata.ucar.edu/content/support/help/MailArchives/netcdf-java/msg00146.html However, I did not find any final solution for this problem there.
2. When calling the NetcdfFileWriteable.create() method I get the following error: /home/ads/gads_temp/src/uk/ac/nercessc/gads/datarequest/datawriter/CDFDataWriter.java:122: warning: create() in ucar.nc2.NetcdfFileWriteable has been deprecated ncFileOut.create();
ucar.nc2.NetcdfFileWriteable.open() is deprecated, but not create(), so im confused by this. also, deprecation are only warnings at compile time, and wont affect runtime. when reporting rrors, probably better to send the whole stack trace.