I’m trying to run one of
Snap Python Bridge) examples, on images provided within the same folder (
.snap/snap-python/snappy). The issue I’m encountering regard the
java classpath and the
hdf5 driver java library.
Here is the command I entered to run the
python snap example and the warning I’m getting: https://bpaste.net/show/5acb105c8b2a
Even though the script works, and the ouput
png file is created, I cannot understand why I get this warning if the
java hdf5 library is there.
Please note that:
java jre was not installed before the installation of
snap, and as a result has been installed inside
java path to
shell path doesn’t resolve this issue:
hdf5 java driver exists:
~/snap $ find . -name hdf5
Hi hakim, just tested the same with SNAP 2 beta 6 on a Windows 10 without problems. Which OS are you on?
May I ask you for some more guidance here to reproduce whats going wrong. Please have a look into snappy/snappy.ini. This is the config file for snappy. Set debug:True and run again. Could you cut, paste and send the output please. Thanks!
It seems that the JVM’s “java.library.path” setting is not correctly computed from your SNAP installation directory. See snappy/init.py, line 177.
Thanks for your answer.
Ubuntu 14.04 (Trusty).
I got the same warning with
debug: True in
I couldn’t guess when
snappy/__init__.py is called (tried logging to a file there, it’s not called).
However, from your https://bpaste.net/show/392f7017be85 it seems that snappy is operational!
The actual error comes from the fact that the variable ‘b7’ has the value None.
The sample code has been written for an ENVISAT MERIS L1b test product and you are calling it with a Sentinel-2 L1C product. Please adjust the band names in the Python code and you should be fine.
The HDF5 error is an issue that we’ll fix but it is not your problem anymore, just ignore the error message for time being.
set path=C:\Program Files\Java\jdk1.7.0\bin
Using wildcards in java classpath
Wild cards were introduced from Java 6. Class path entries can contain the basename wildcard character *, which is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR. For ex. a classpath entry consisting simply of * expands to a list of all the jar files in the current directory.
java -cp “lib/*” %MAINCLASS%
More about…Java Classpath