NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Don,Looks like I'll find another way to get to the NetCDF file instead of embedding it in a jar file.
Thanks, Doug Don Murray wrote:
Hi Doug- Doug Lindholm wrote:I'm trying to webstart my visad app but it is having trouble with a NetCDF file I have in a jar file. I create a URL for the file using a technique that works for other data I have so I assume this is a visad/netcdf problem. Here's the Exception:HTTPClient.ProtocolNotSuppException: Unsupported protocol 'jar' at HTTPClient.HTTPConnection.<init>(HTTPConnection.java:585) at HTTPClient.HTTPConnection.<init>(HTTPConnection.java:562) at HTTPClient.HTTPConnection.<init>(HTTPConnection.java:605)at ucar.netcdf.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.java:58) at ucar.netcdf.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.java:50)at ucar.netcdf.NetcdfFile.<init>(NetcdfFile.java:186) at visad.data.netcdf.Plain.open(Plain.java:271) Any ideas how I can open the NetCDF file via webstart?Does this work outside of WebStart? I would bet not. I'm guessing that you are passing in a URL that is the result of a Class.getResource() call which returns a URL. This will return a URL that starts with jar: jar:file:/C:/java/metapps/lib/visad.jar!/visad/ss/open.gif The netCDF library uses the HTTPClient software to handle URL's and this doesn't handle a URL like the above. So, for now, I would say don't put it in a JAR file and put it on the local disk or on a web server and pass in the absolute path. Don ************************************************************* Don Murray UCAR Unidata Program dmurray@xxxxxxxxxxxxxxxx P.O. Box 3000 (303) 497-8628 Boulder, CO 80307 http://www.unidata.ucar.edu/staff/donm *************************************************************
-- *----------------------------------------------------------------------* | Doug Lindholm, Software Engineer | E-mail: lind@xxxxxxxx | | Research Applications Program | Phone: 303-497-8374 | | National Center for Atmospheric Research | | | P.O. Box 3000 | There's no place | | Boulder, Colorado 80307-3000 | like $HOME | *----------------------------------------------------------------------*
visad
archives: