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.
you are welcome, it happens all the time, one of the reasons i hate environment variables, esp CLASSPATH
Even Solbraa wrote:
So you can compile and run the source code ok, but not run the jar file?Is it possible you have an old jar file that your $CLASSPATH inadvertantly points to?You are right! I have mounted the VisAd package to my system classpath - which contains the old netCDF package. I moved the netCDF 2.0 package up in my classpath hierarchy - and everything works fine. Sorry for this stupid mistake - and thank you for your help. Even Even Solbraa wrote:I don't think it was a class path error. I downloaded the source code and compiled it with netbeans 3.2 (jdkVersion1.3.0_02) - and it worked fine (no source-code for ucar.unidata.* packageindownloaded files). I'm still not able to get the jar file to work. So it seems like the code I compiled with my own settings works fine - but not the jar file. this was my error message: java.lang.NoSuchMethodError at ucar.nc2.NetcdfFile.init(ucar/nc2/NetcdfFile.java:69) at ucar.nc2.NetcdfFileWriteable.create(ucar/nc2/NetcdfFileWriteable.java:225) at CreateNetcdf.main(CreateNetcdf.java:102) Exception in thread "main" Even Solbraa -----Original Message----- From: John Caron [mailto:address@hidden] Sent: 6. august 2001 20:01 To: address@hidden Cc: address@hidden Subject: Re: problems running example 1 in documentation probably a classpath error - you must have the new library on your classpath when you run, eg: java -classpath netcdf2.jar CreateNetcdf Even Solbraa wrote:Hi, I have a problem to run Example 1 in the documentation for NetCDF: Create a netCDF File I use version 2 beta. Compiling is ok - but when I run it - it fails I get the error message: java.lang.NoSuchMethodError at ucar.nc2.NetcdfFile.init at ucar.nc2.NetcdfFile.create does anyone know the reason for this ? Even Solbraa