B4J Question Modules file

Pelky

Active Member
Licensed User
Longtime User
Hello oh fonts of knowledge, I have a problem that i need some help understanding.
When building a standalone application I find in the Build/Lib folder a file called Modules. This file is 46mb in size
and I was wondering if there was a way to reduce the size. I need to be able to email the application and it exceeds
the 30mb limit that outlook has. I have tried to reduce the libraries etc but this does not seem to make a difference.

Thank you in advance for your assistance.
 

Pelky

Active Member
Licensed User
Longtime User
I am not entirely sure what you mean by that however I did some testsm with smaller apps and found that the size does change quite significantly depending on the designer definitions. I am sure there are other influencing issues tho.

What I am after is the smallest footprint when distributed. If you have any advice to give regarding that it would be appreciated.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Do not use the packager; distribute the JAR alone. This is the smallest footprint.

Java must be installed on the target system though.
 
Upvote 0

Pelky

Active Member
Licensed User
Longtime User
Do not use the packager; distribute the JAR alone. This is the smallest footprint.

Java must be installed on the target system though.
I would like to thank you for your response and apologise for not coming back to you sooner - i have been working ridiculous hours.
I am not sure what you mean by the JAR alone. I have tried finding one but only
find the following files; JavaFx-Swt.Jar / JRT-Fs.Jar / Jar.Jar

Is one of these the Jar file you are referring to?
 
Upvote 0

Pelky

Active Member
Licensed User
Longtime User
Thank you so much Erel your assistance it is very much appreciated.

To compile with Java 8 do I need to download that version and change my build parameters?
Also the computer I will be loading onto is windows 7 - does that make a difference?
 
Upvote 0

Pelky

Active Member
Licensed User
Longtime User
I guess that you tried to build a standalone package. This is only supported by Java 11+.

See my answer in post #7.
I did indeed do that - I have now followed your instructions in #7 and it created a JAR file.

I double click on that and nothing happens. So I created a .bat file and got this message -

C:\DevX\Legals\LegalVisits\B4J\Objects>java -jar LegalVisits.jar
Error: JavaFX runtime components are missing, and are required to run this application

[process exited with code 1]

once again it would appear that I am missing something or the jar n3eds to be moved somewhere?
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
I did indeed do that - I have now followed your instructions in #7 and it created a JAR file.

I double click on that and nothing happens. So I created a .bat file and got this message -

C:\DevX\Legals\LegalVisits\B4J\Objects>java -jar LegalVisits.jar
Error: JavaFX runtime components are missing, and are required to run this application

[process exited with code 1]

once again it would appear that I am missing something or the jar n3eds to be moved somewhere?
Check if you have javafx folder inside your jdk-11.x.x folder.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
If you've set java8 in configure paths, make sure you don't have a #JavaCompilerPath directive pointing to java11 in your project
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Probably near the top of Main module, do a search for #javacomp. It'll find it if it's there.
 
Upvote 0

Pelky

Active Member
Licensed User
Longtime User
Probably near the top of Main module, do a search for #javacomp. It'll find it if it's there.
I searched and found nothing ....

#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"

'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region

I
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
It was just a thought. Javafx was included with the java 8 jdk, so if you've downloaded the jdk from the B4j download page you shouldn't get this issue.
 
Upvote 0
Top