Closed walkero closed 6 years ago
That's possible but unfortunately that will be not enough. Actually all class names, method names etc should contain package prefix inside shared library (libirohajava,so or libirohajava.jni). That means that shared library should also be recompiled for every package name. Any non-empty package name will be fine for you, right? Please correct me if I'm wrong.
hi, @luckychess thank you. Yes,that is what i want, you are right, i added package name to those none package name classes in iroha-bindings-example.jar, but that does not work. How to add package name and recompile the libirohajava.so ? Do you have any instructive document for my reference?
thanks
I found a file for reference:
iroha/shared_model/packages/android/android-build.sh
and modified the CMakeLists.txt file
diff CMakeLists.txt CMakeLists.txt.bak
68c68
< SET(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} -package sun)
---
> find_package(JNI REQUIRED)
thanks
@walkero thank you for your great job! Could you please open a PR with those changes, maybe it makes sense to add them directly to Iroha? (Don't forget to sign your commits with DCO though github.com/apps/dco and describe changes)
@laSinteZ thank you I will try to do it. It will be my first time to open a PR, I'll learn how to do it first.
@walkero if you have any problems with it – we are glad to help. To make things faster, you can use https://gitter.im/hyperledger-iroha/Lobby or in https://chat.hyperledger.org/channel/iroha :)
hi, @laSinteZ I opened a PR. thanks
hi
I tested java client example
iroha/example/javaTransactionExample.java
it is OK, can be luanched at console window. javaTransactionExample.java file has none package name, can find some none package name classes in iroha-bindings-example.jar :but when I want to access irohad from a java web application, not a console base application, my java spring web framework couldn't find those none package classes (default package class) in iroha-bindings-example.jar classes which have package name couldn't find none package name classes in java.
it is possible to add package name to those none package name java classes ? package iroha.xxxx;
thanks