Jpy Python-Java bridge version

Perfect, this is what I was looking for!

Thanks Andreas,
Best regards,
Philipp

1 Like

Greetings!
I have installed snap-python, but I am getting this error “nest is not a win32 valid application” in examples as follows:

from

https://senbox.atlassian.net/wiki/spaces/SNAP/pages/50855941/Configure+Python+to+use+the+SNAP-Python+snappy+interface

I correctly installed and configured snappy as:

cd /snappy
cd setup.py install

where
is C:\Users\toshiba.snap\snap-python

I verified the installation folder of the snappy in my python-package installer

C:\Python27\Lib\site-packages\snappy

However, when I try to run the test on an example :

from snappy import ProductIO
p = ProductIO.readProduct(‘snappy/testdata/MER_FRS_L1B_SUBSET.dim’)
list(p.getBandNames())

I get the following error:

File “c:\Users\toshiba.snap\snap-python\snappy\examples\snappy_flh.py”, line 4, in
from snappy import Product
File “C:\Python27\lib\site-packages\snappy_init_.py”, line 63, in
jpyutil.preload_jvm_dll()
File “C:\Python27\lib\site-packages\snappy\jpyutil.py”, line 315, in preload_jvm_dll
return ctypes.CDLL(jvm_dll_file, mode=ctypes.RTLD_GLOBAL)
File “C:\Python27\lib\ctypes_init_.py”, line 365, in init
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 193] %1 nest pas une application Win32 valide

nest is not part of snappy nor SNAP
Is it maybe an additional python package you have installed or some other application?

Do you have the old Nest application installed? But actually this should not interfere with SNAP/snappy.

I don’t know where this error comes from

EDIT: The replies are not below the actual thread above, so to preface:

I am following this thread and perform python ./jpyutil.py -j -p after following the instructions here.

However, without the options -j -p it works just fine.

I am trying to follow these instructions to install jpy (for SNAP), but am getting the following error:

RuntimeError: can't find any Python shared library

The specs are:

  • Mac OS High Sierra / Unix (10.12.6)
  • python 3.6.3

A similar error occurs when I run $ ./snappy-conf <python-exe> per the confluence page.

Assume there are new comments/instructions, but having trouble finding them.

Java Access Bridge is a technology that exposes the Java Accessibility API in a Microsoft Windows DLL, enabling Java applications and applets that implement the Java Accessibility API to be visible to assistive technologies on Microsoft Windows systems. Java Accessibility API is part of Java Accessibility Utilities, which is a set of utility classes that help assistive technologies provide access to GUI toolkits that implement the Java Accessibility API.

In order for existing assistive technologies available on Microsoft Windows systems to provide access to Java applications, they need some way to communicate with Java Accessibility Utilities. Java Access Bridge supports this communication.

An assistive technology application running on Microsoft Windows (for example a screen reader) communicates with Java Access Bridge DLLs, which in turn communicates with the Java Virtual Machine through Java Access Bridge Java libraries. These Java libraries communicate with Java Accessibility Utilities. Java Accessibility Utilities collects information about what is happening in the Java application, which it forwards to the screen reader through Java Access Bridge.

Project description jpy is a bi-directional Python-Java bridge which you can use to embed Java code in Python programs or the other way round. It has been designed particularly with regard to maximum data transfer speed between the two languages.
Make sure an up-to-date JDK 8 is installed, preferably the Oracle distribution, because this is the one we use in SNAP.
Make the JDK_HOME env var points to the JDK installation directory. If this variable is already in use, you can also set JPY_JDK_HOME.
Make sure Apache Maven 3 is installed. Know more about where to use python visit: https://www.cetpainfotech.com/technology/python-training