B4J Question Chilkat bundle for Linux server

avalle

Active Member
Licensed User
Longtime User
I'm interested in using the wrapper for the Chilkat libraries in a B4J server application running on Linux in a public cloud.
I'm assuming that the work @DonManfred published at https://www.b4x.com/android/forum/threads/chilkat-bundle.125869/ is packaged for use on Windows.

Forgive my ignorance, but what would be needed to adapt it to run in a Linux VPS? The original library is available for Linux.

I'd also like to know if this project is being maintained and developed further.
I think I've also found a bug but I don't know how to contribute and if there are any updates after last year's release.

Thanks
Andrea
 

DonManfred

Expert
Licensed User
Longtime User
Forgive my ignorance, but what would be needed to adapt it to run in a Linux VPS?
i don´t know. Which of the downloads is for the linux you use????

I'd also like to know if this project is being maintained and developed further.
i have not stopped it. But also no news...

Note that the wrapper is written in java to use it in b4j

But you may be able to add linux support if you add the .so file named as chillkat.so and put it inside the chilkat-bundle.jar/lib/yourarchtouse/libchillkat.so
 
Last edited:
Upvote 0

avalle

Active Member
Licensed User
Longtime User
Also, does it matter if the library is more recent than the version you wrote the wrapper for?

(then you see all my ignorance... :) )
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

avalle

Active Member
Licensed User
Longtime User
I tried to put the libchilkat.so file in the same path as the jar but it did not work.

From the error log I found out that it had to be placed in one of the java.library.path:
[/usr/java/packages/lib, /usr/lib/x86_64-linux-gnu/jni, /lib/x86_64-linux-gnu, /usr/lib/x86_64-linux-gnu, /usr/lib/jni, /lib, /usr/lib]

Thanks both for helping out!!
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
From the error log I found out that it had to be placed in one of the java.library.path:
Take the chilkat.jar, rename it to zip. Open the zip. Add the .so file as libchilkat.so to the lib folder in the zip.
Rename the zip back to .jar... Try again
 
Upvote 0

avalle

Active Member
Licensed User
Longtime User
Sorry, I wanted to say that it works by simply copying the libchilkat.so file into /usr/lib with no further changes to other files

I want to try your suggestion as it looks cleaner, but I'm not clear if the chilkat.jar file you're talking about is the one from the Chilkat library download (see screenshot below) or you actually mean the ChilkatBundle.jar file.

1637946737312.png
 
Upvote 0

avalle

Active Member
Licensed User
Longtime User
Placing the .so file in the lib folder of the Bundle JAR does not seem to work. Same error as with the original Bundle JAR:
main._process_globals (java line: 192)
java.lang.UnsatisfiedLinkError: no chilkat in java.library.path: [/usr/java/packages/lib, /usr/lib/x86_64-linux-gnu/jni, /lib/x86_64-linux-gnu, /usr/lib/x86_64-linux-gnu, /usr/lib/jni, /lib, /usr/lib]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2670)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
at java.base/java.lang.System.loadLibrary(System.java:1873)
at de.donmanfred.CkGlobalwrapper.<clinit>(CkGlobalwrapper.java:215)
at b4j.example.main._process_globals(main.java:192)
at b4j.example.main.initializeProcessGlobals(main.java:183)
at b4j.example.main.main(main.java:27)

I'm moving forward with the .so library in /usr/lib unless you have other ideas.
Thanks so much in any case, really appreciate the help.
 
Upvote 0
Top