Re: problems running example 1 in documentation


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 (jdk

Version

1.3.0_02) - and it worked fine (no source-code for ucar.unidata.* package

in

downloaded 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:caron@xxxxxxxxxxxxxxxx]
Sent: 6. august 2001 20:01
To: solbraa@xxxxxxxxxxxx
Cc: netcdf-java@xxxxxxxxxxxxxxxx
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



  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: