Also what command are you using to launch the built java program. It must be able to find the native libraries.
On linux this can be done by setting LD_LIBRARY_PATH=<path_to_library_files> or depending on the setup of your java application you could add -Djava.library.path=<path_to_library_files> The error to me look like it is not finding the library that it expects. George -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Mats Wichmann Sent: Friday, November 10, 2017 8:41 PM To: Mahmood, Suleman <[email protected]>; [email protected] Subject: Re: [dev] Java example with security On 11/10/2017 08:02 PM, Mahmood, Suleman wrote: > Hi, > > I am new to Iotivity and recently started experimenting with java API. > > I built the Java API using the following command on IoTivity 1.3 release: > > scons WITH_TCP=yes RELEASE=yes TARGET_TRANSPORT=IP SECURED=1 > BUILD_JAVA=1 BUILD_SAMPLES=ON TARGET_ARCH=x86_64 WITH_CLOUD=yes > JAVA_HOME=$JAVA_HOME > > I translated the C example using Access Control List to Java and executed the > Server. This gave me the following exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: no oc_logger in > java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) > at java.lang.Runtime.loadLibrary0(Runtime.java:870) > at java.lang.System.loadLibrary(System.java:1122) > at org.iotivity.base.OcPlatform.<clinit>(OcPlatform.java:39) > at test.App.createLEDResource(App.java:63) > at test.App.main(App.java:33) > > > Is this a known bug or am I doing something wrong? Known Bugs should be at jira.iotivity.org oc_logger looks like it should be part of the java build, it's added in java/jni/SConscript: jni_env.PrependUnique(LIBS=[ 'resource_directory', 'oc', 'octbstack', 'oc_logger', 'connectivity_abstraction' ]) and is part of the "ensure" login in java/SConscript. so it looks like something may have gone askew in the build that blocked the normal behavior (sorry can't be more direct help than that, don't work on the java part) _______________________________________________ iotivity-dev mailing list [email protected] https://lists.iotivity.org/mailman/listinfo/iotivity-dev _______________________________________________ iotivity-dev mailing list [email protected] https://lists.iotivity.org/mailman/listinfo/iotivity-dev
