B4J Question [B4X][Macros] Is there a way to prevent a helper .jar from timing out and closing automatically?

William Lancee

Well-Known Member
Licensed User
Longtime User
I have a app that compares a current sub showing in the IDE to the same one that is part of another app or another version of it.
The idea is to see what the differences there are and what changes I should make.

This works nicely but after about 20 seconds (while I am still thinking) it closes and I have to restart it by clicking the button on top of IDE.
Unfortunately It starts at the beginning - I can fix that but I rather not make it state dependent - and I have to navigate to where I was.
This timeout occurs for both B4J and B4A.

I have set then MainForm.AlwaysOnTop = True. It doesn't stop the timeout.
 
Solution
I still get "Completed. Exit code: -1" after 30 seconds, but the app stays alive.
I used this .bat file:
B4X:
set javaLocation=%2\..
CD %javaLocation%\bin
javaw --module-path %javaLocation%\javafx\lib --add-modules ALL-MODULE-PATH -jar "C:\Additional\SubComparator.jar" %1

And the revised macro:
B4X:
#Macro: Title, Sub Comparator, ide://run?File=%ADDITIONAL%\SubComparator.bat&Args="%PROJECT% %JAVABIN%"

I suppose the difference is javaw?

William Lancee

Well-Known Member
Licensed User
Longtime User
I still get "Completed. Exit code: -1" after 30 seconds, but the app stays alive.
I used this .bat file:
B4X:
set javaLocation=%2\..
CD %javaLocation%\bin
javaw --module-path %javaLocation%\javafx\lib --add-modules ALL-MODULE-PATH -jar "C:\Additional\SubComparator.jar" %1

And the revised macro:
B4X:
#Macro: Title, Sub Comparator, ide://run?File=%ADDITIONAL%\SubComparator.bat&Args="%PROJECT% %JAVABIN%"

I suppose the difference is javaw?
 
Last edited:
Upvote 0
Solution
Top