-
Notifications
You must be signed in to change notification settings - Fork 11
Can't find class [org/drinkless/tdlib/Client] #56
Comments
Hi |
I've removed @ExperimentalTime
fun main(args: Array<String>) {
val telegram = Telegram(
configuration = TelegramClientConfiguration(
maxEventsCount = 1000,
receiveTimeout = 1.seconds //ms
)
)
val client = telegram.client()
} But am getting below error Try to load tdlib as library
Try to load tdlib from artifact
java.lang.UnsatisfiedLinkError: no tdjni in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at dev.whyoleg.ktd.LinkKt.loadTdlib(Link.kt:8)
at dev.whyoleg.ktd.TelegramRawClient.<clinit>(TelegramRawClient.kt:8)
at dev.whyoleg.ktd.NativeClient.<init>(NativeClient.kt:8)
at dev.whyoleg.ktd.Telegram.client(Telegram.kt:11)
at Main2Kt.main(Main2.kt:14)
java.lang.UnsatisfiedLinkError: /tmp/libtdjni5596519461042064073.so: /usr/local/lib/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by /tmp/libtdjni5596519461042064073.so)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1946)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1828)
at java.lang.Runtime.load0(Runtime.java:810)
at java.lang.System.load(System.java:1088)
at dev.whyoleg.ktd.LinkKt.loadTdlib(Link.kt:22)
at dev.whyoleg.ktd.TelegramRawClient.<clinit>(TelegramRawClient.kt:8)
at dev.whyoleg.ktd.NativeClient.<init>(NativeClient.kt:8)
at dev.whyoleg.ktd.Telegram.client(Telegram.kt:11)
at Main2Kt.main(Main2.kt:14)
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /home/theapache64/Documents/projects/ktd-test/libs/linux/libtdjni.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1831)
at java.lang.Runtime.load0(Runtime.java:810)
at java.lang.System.load(System.java:1088)
at dev.whyoleg.ktd.LinkKt.loadTdlib(Link.kt:27)
at dev.whyoleg.ktd.TelegramRawClient.<clinit>(TelegramRawClient.kt:8)
at dev.whyoleg.ktd.NativeClient.<init>(NativeClient.kt:8)
at dev.whyoleg.ktd.Telegram.client(Telegram.kt:11)
at Main2Kt.main(Main2.kt:14)
Try to load tdlib from local path: /home/theapache64/Documents/projects/ktd-test/libs/linux/libtdjni.so
Can't load tdlib NOTE: I am using Ubuntu 16.04 |
tdlib for |
Okay. I didn't know it was built using Ubuntu 18.04. You found it so fast ⏩ 👍 😄 Good job |
I will add info about build environment and versions of dependencies during the next release phase. Thx that you found it! |
I have similar exception. I try to run example on OSX. Build TDLib with this instruction (v1.6.0), move dynamic library to project's root. Traceback
|
@rusnasonov So, the exception is expected... Because that lib uses custom pre-built tdlib with different package names, and in next release it will even change a lot... fun main(args: Array<String>) {
parser().parse("tdlib -p jvm -t mac".cmd())
} It will build tdlib, which then can be used with lib as you want |
For now I will reopen that issue, and before next release document that and provide links to CLI and how to use it |
@whyoleg I have tried your approach on macOS Catalina 10.15.7 but getting this error:
And inside |
I've added the depency
I've
libtdjni.so
in my/usr/local/bin
. So I've passed-Djava.library.path=/usr/local/bin
toVM options
(IntelliJ IDEA Run Configuration)But when I try to create
TelegramClient
, am getting below errorThe text was updated successfully, but these errors were encountered: