B4J Question [SOLVED] Embed 7-Zip stand-alone tool (7za.exe) inside compiled jar file

raphaelcno

Active Member
Licensed User
Longtime User
I have a B4J project where I'm using jShell and 7-Zip stand-alone tool (7za.exe) to decompress gz (gzip) archive files, based on thread https://www.b4x.com/android/forum/t...class-to-work-with-tar-gz-files-solved.111971 .
It works nice!

But when I use the compiled jar file on another computer (computer without my B4J project and the 7za.exe file), I get following error message in StdErr (from shell_ProcessCompleted event):
'7za.exe' is not recognized as an internal or external command,
operable program or batch file.


I understand that I have to distribute 7za.exe with the jar file.
Is there a possibility to embed 7za.exe inside the jar file?

Raphaël
 

raphaelcno

Active Member
Licensed User
Longtime User
I just include it with my Jar file (same directory as Jar file etc)

Yes, it's also what I did after I saw the error message, and this solution works correctly.

But I was wondering if it was possible to include the 7za.exe file "inside" the jar file.
In that way I wouldn't need to explain to other people that they must put both files in the same directory, and that they must double clic on the jar file (not the exe file)?
 
Upvote 0
Top