B4J Question Call non-ui app (.jar) with parameter from another app

Roycefer

Well-Known Member
Licensed User
Longtime User
I presume you mean call a b4j-jar direct from another app. In that case, use that program's shell abilities to call
B4X:
java -jar MyJar.jar arg1 arg2 arg3

Inside AppStart() of MyJar.jar, arg1, arg2 and arg3 will appear as elements in the Args() As String parameter. Inside MyJar.jar, anything you put inside Log() will be printed to Standard Out. If the calling program has the ability to capture Standard Out of shell commands it executes than it should be able to see MyJar.jar's output. B4J's jShell library has this capability.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…