B4J Question Two standalone .exe files that run in the same folder ?

Olivier Zeegers

Active Member
Licensed User
Hello,

I have created two projects in B4J.
The first is the main program that displays a number that increases everytime the user clicks with the mouse.
The second is the managing program where the user can set with what amount the number increases with each click.

The number is stored in a file and both the programs read and write the number to this file...

I now want to let other users use this program en thus I wanted to create a standalone version.
This I achieved for both the projects but when I put the .exe of the managing program in the dir of the main program it just runs the main app.

So does anyone know how I can put both the .exe files in 1 dir so that they use the same file for storing and retreiving the number ?

thank you !
 

Swissmade

Well-Known Member
Licensed User
Longtime User
Seems to me like 1.exe and 2.exe can run in the same folder.
The datafile can also be in this folder or create a dir where you like to have the datafile in the folder where you have the exe files.
 
Upvote 0

Olivier Zeegers

Active Member
Licensed User

when i run it from its build folder, it runs perfectly
When i copy this into the folder of the other app, it just starts the other app ?

 
Upvote 0

Magma

Expert
Licensed User
Longtime User
Hi there...

1) using exe produced from B4X IDE need to have all of the "build" folder and files have in it.... so the best solution is to have two different folders for every application, like this:



2) Other way is to use jar release files and openjava jdk folder to run them with batch files...

3) and another way is to use Launch4j have all the folders/files into in one exe like portable - but not sure if that works 100% with openjava

check also - this way:
Another Way to Create Executables for Windows !
 
Last edited:
Upvote 0

Swissmade

Well-Known Member
Licensed User
Longtime User
I always create exe file with Launch4j.
I the folder where the exe is I create a folder jre and tell Launch4j that the Java Runtime is there.

Always working for me.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…