Re: netcdf-java v2.1 compilation error

xing wrote:

On Fri, Dec 05, 2003 at 03:04:13PM -0700, John Caron wrote:
xing wrote:


I attempted to compile v2.1-netcdfSrc.jar, but failed with error:

Buildfile: build.xml

  [echo] Initialize ucar.nc2


[javac] Compiling 27 source files to /data0/xing/netcdf/work/netcdf.old/build/classes [javac] /data0/xing/netcdf/work/netcdf.old/src/ucar/nc2/dods/ exception dods.dap.NoSuchAttributeException is never thrown in body of corresponding try statement [javac] } catch (dods.dap.NoSuchAttributeException e) { } // shold not throw an exception
 [javac]       ^
[javac] /data0/xing/netcdf/work/Java-DODS/dods/dap/ warning: readLine() in has been deprecated
 [javac]         String line = d.readLine();
 [javac]                        ^
[javac] /data0/xing/netcdf/work/Java-DODS/dods/dap/ warning: readLine() in has been deprecated
 [javac]     while (!(line = d.readLine()).equals("")) {
 [javac]                      ^
 [javac] 1 error
 [javac] 2 warnings

file:/data0/xing/netcdf/work/netcdf.old/build.xml:73: Compile failed; see the compiler error output for details.

Total time: 3 seconds

I am using j2sdk1.4.2_01 and apache-ant-1.5.4.
Tried deprecation too, no help.  Should I use older j2sdk?

I also tried v2.2-netcdfSrc.jar, it went fine.
But the codes are quite different than v2.1-netcdfSrc.jar

Which version of netcdf-java is recommended for development?

Thanks in advance,


2.1  is correct version, 2.2 is not released, and wont work.

you are using an incompatible version of dods source. any reason not to just use the provided netcdfDods.jar file?

The build.xml file in v2.1-netcdfSrc.jar has these lines:

<property name="dodsSrc.dir" location="${root.dir}/../Java-DODS"/>
<pathelement location="${dodsSrc.dir}"/>

I figured I needed dods source.

With your suggestion I have succeeded using netcdfDods.jar.
Out of curiosity, where is the compatible version of dods source?

unfortunately, we are using an unreleased version of the source. Perhaps i should add it to our source release.

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