B4J Question [SOLVED] jColorLogger UnsatisfiedLinkError: The specified module could not be found

Michael Sergio

Member
Licensed User
Longtime User
Hi. I have this code in an non-ui app:

B4X:
Sub Process_Globals
Private cl As ColorLogger
End Sub

Sub AppStart (Args() As String)
'code
cl.Initialize("green", "black", False, "cl").ColorLogLine("Starting program", "", "")
'some code
cl.ColorLogLine("SSll started", "aqua", "")
End Sub

The problem is that my app is working on the pc I developed it, but not on another pc ( same Windows 8.1 version on both, updated etc)

The error:
B4X:
main._appstart (java line: 81)
java.lang.UnsatisfiedLinkError: The specified module could not be found.

    at com.sun.jna.Native.open(Native Method)
    at com.sun.jna.Native.open(Native.java:1759)
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:260)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
    at com.sun.jna.Library$Handler.<init>(Library.java:147)
    at com.sun.jna.Native.loadLibrary(Native.java:412)
    at com.sun.jna.Native.loadLibrary(Native.java:391)
    at butt.droid.colorlogger.ColorLogger$CLog.<clinit>(ColorLogger.java:44)
    at butt.droid.colorlogger.ColorLogger.Initialize(ColorLogger.java:91)
    at b4j.example.main._appstart(main.java:81)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:77)
    at b4j.example.main.main(main.java:29)

If i remove the library and all references, my app is working just fine on the other PC as well.
I tried adding #AdditionalJar: jna-4.1.0 but still no go.

I don't really know what`s happening. If someone can help me ,thank you.
 

Roycefer

Well-Known Member
Licensed User
Longtime User
What version of the library are you using? Also, what JDK are you using on both computers, complete with bitness? It's best to use a 64-bit JDK on a 64-bit computer.
 
Upvote 0

Michael Sergio

Member
Licensed User
Longtime User
I`m using jColorLogger version 1.50 and jna -4.1.0
On both computers i have Java SDK version 8 Update 171(64 bit) and Windows 8.1.
I also tried with Update 172.
I installed B4J on the other PC, added the libraries and recompiled my program, still the same error.
Thank you.

Later Edit:
After i posted i searched for common problems in general programming in my other pc, and i saw i`m missing some vc++ redist.
I tried installing and uninstalling redistributable, and it seems that i found my problem.
I needed vcredist 2010! After I installed that version, program worked with ColorLogger.
I uninstalled vc 2010 , and it didn`t work again, so I`m sure that was my problem.
PROBLEM SOLVED FOR ME.
Thank you.
 
Last edited:
Upvote 0
Top