B4J Question [Answered][B4X] AdditionalJar vs. Library Reference

Jorge M A

Well-Known Member
Licensed User
Longtime User
Hello Everyone,

I would like to understand what goes on behind the scenes between an AdditionalJar and a referable library.
Why doesn't an AdditionalJar appear in the references tab? In what does its differentiation consist?

Please consider that I am illiterate in Java.

I post the question in B4J because it's what I'm currently using, but it applies the same in B4A?

Thank you very much.
 

Daestrum

Expert
Licensed User
Longtime User
AFAIK the xml file that accompanies a library file actually informs the IDE of what functions are available within the library and so it can show it in autocomplete.

An Additional jar is just added to the classpath, and the IDE has no idea what is inside.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
AdditionalJar just tells the compiler to add a reference to that resource during compilation. The compiler doesn't know anything about that jar. In most cases you will use inline Java or JavaObject to access it.

A standard library is made of two files: the jar file and a xml file. The xml file includes all the information that the compiler needs to know about the library and allows you to write code that directly accesses the library.
 
Upvote 0
Top