[quote]Used the sample “hello world” provided with the eval pro version, and the executable produced was of size 2.1 mb…
Man this is such a joke :
[/quote]
Well this is due to the bloated 1.4 API which has too many interdependencies.
>java -version
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
> java -verbose hello | grep "\[Loaded" | wc -l
259
As you may see, the 1.4.2_03 VM has to load 258 Java 2 API classes just to execute “Hello, World”.
Anyway, that EXE 7zips to about 750K, which is much less than the size of the JRE. You can save extra 60K by disabling inlining completely in the project file:
-inline
Then, 2MB is just the minimum overhead for J2SE 1.4.2. Alien Flux 1.5 compiles to less than 5MB EXE without resources (images, sound, security provider classes, etc.), which 7zips to about 1.5MB. If you choose to bind resources, the result will be 13MB EXE (7zips to 9.5MB), which only needs two LWJGL native method DLLS to run.
With Java 2 1.3, the EXE would be much smaller. When running the hello sample on JRE 1.3.1_10, only 181 platform API classes get loaded.
I would therefore suggest that you try JetPerfect on a bigger project.