B4J Question Calling B4J routines from Java

B4JExplorer

Active Member
Licensed User
Longtime User
Hi,

Is there anything special, like naming conventions in the B4J routines, that we have to do, in order to call the methods in a B4J jar, from Java? Or any specific suggestions, that just make things more convenient?
 

Roycefer

Well-Known Member
Licensed User
Longtime User
You mean from inline Java?

B4J sub names are typically lower-cased and often pre-pended with an underscore. Some subs will also have an additional parameter (usually a BA variable) that isn't visible to the pure B4X programmer but will have to be provided when being called from Java code. You can examine the generated Java source code in the Objects/src directory of one your compiled B4J projects to see how these conventions work.
 
Upvote 0

B4JExplorer

Active Member
Licensed User
Longtime User
You mean from inline Java?

B4J sub names are typically lower-cased and often pre-pended with an underscore. Some subs will also have an additional parameter (usually a BA variable) that isn't visible to the pure B4X programmer but will have to be provided when being called from Java code. You can examine the generated Java source code in the Objects/src directory of one your compiled B4J projects to see how these conventions work.

Thanks, not from inline java. But from Java or Groovy applications.

In other words, if we want to call an existing B4J external library, from our Groovy code, is there anything special we should do?

Anyway, you answered the questions, thanks. I'm looking at some of the generated source now.


Regards,

BE
 
Upvote 0
Top