B4J Question *.jar file not recognized in External Library path

TorontoJim

Member
Licensed User
Longtime User
I have a jar file from Bouncy Castle that I have placed in the configured folder for external libraries. The file is not being recognized according to testing. Do I need to do something else to use the file, e.g. an import statement or similar?
 

DonManfred

Expert
Licensed User
Longtime User
Do I need to do something else to use the file, e.g. an import statement or similar?
A single jar file without a correcponding xml file is just a JAR. Nothing more.There is NO library here.

If you need to use it you need to add it to your project with #additionaljar
 
Upvote 0

TorontoJim

Member
Licensed User
Longtime User
I've added that and it is still failing. Is my syntax/placement correct for the above?

Loading bouncy castle:
#AdditionalJar: bcprov-jdk18on-1.83

'Non-UI application (console / server application)
#Region Project Attributes
    #CommandLineArgs:
    #MergeLibraries: True
#End Region

Sub Process_Globals
    
End Sub

Sub AppStart (Args() As String)
    Try
        Dim jo As JavaObject
        jo.InitializeNewInstance("org.bouncycastle.crypto.engines.ChaCha20Poly1305", Null)
        Log("SUCCESS: BC is loaded")
    Catch
        Log("FAIL: BC not loaded")
    End Try
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…