Closed Ioakeimis closed 1 year ago
You need to specify java.library.path
to JVM, For example, java '-Djava.library.path=.' org/drinkless/tdlib/example/Example
.
Where do I do/specify this? I am using IntelliJ as an IDE
Perfect! I have managed to make it work by following your link and then specifying "../../../td/tdlib/bin" as Djava.library.path. Thanks :)
???
сб, 18 мар. 2023 г., 21:43 Aliaksei Levin @.***>:
You need to specify java.library.path to JVM, For example, java '-Djava.library.path=.' org/drinkless/tdlib/example/Example.
— Reply to this email directly, view it on GitHub https://github.com/tdlib/td/issues/2358#issuecomment-1474969288, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZCSN4TJKUU2Q4B2C4MEIG3W4YF43ANCNFSM6AAAAAAV67KCHQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Aliaksei, I cloned the project, built it for Mac/Apple silicon following the instruction, then I imported the project to the Intellij and added a VM argument -Djava.library.path=. but I still get:
java.lang.UnsatisfiedLinkError: no tdjni in java.library.path: .
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
at java.base/java.lang.System.loadLibrary(System.java:1989)
at org.drinkless.tdlib.Client.
You need to specify path to tdjni.dylib as java.library.path
. If you don't run the example from command-line, then "." is highly likely to be a wrong path.
You need to specify path to tdjni.dylib as
java.library.path
. If you don't run the example from command-line, then "." is highly likely to be a wrong path.
It works! Thanks!
I successfully managed to execute all the commands mentioned in the build instructor generator for JAVA on Apple silicon. When I try to just run the main method in the Example.java class I get the following error:
java.lang.UnsatisfiedLinkError: no tdjni in java.library.path: /Users/username/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:. at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2444) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:848) at java.base/java.lang.System.loadLibrary(System.java:2047) at org.drinkless.tdlib.Client.(Client.java:18)
at org.drinkless.tdlib.example.Example.main(Example.java:302)
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'void org.drinkless.tdlib.Client.nativeClientSetLogMessageHandler(int, org.drinkless.tdlib.Client$LogMessageHandler)'
at org.drinkless.tdlib.Client.nativeClientSetLogMessageHandler(Native Method)
at org.drinkless.tdlib.Client.setLogMessageHandler(Client.java:139)
at org.drinkless.tdlib.example.Example.main(Example.java:302)
There was another issue in the closed issues section that had the same error but I was unable to benefit from it in any way :(