Jump to content
Excelsior Forums
Sign in to follow this  
amielcar

Too big native SWT RCP file

Recommended Posts

Hello,

I have compiled with JET 6.5 (trial) a sample RCP application (RCP mail template without any changes)

But I think the file made is too big - it has 33MB, and it can be compressed with zip to 17MB

Can it be smaller? Samples on JET page show that SWT app can take only about 4MB

How can I make it smaller?

I use Eclipse 3.4 Ganymede on Vista

Regards

Adam

Share this post


Link to post
Share on other sites

First of all, let us dispel common (as I see) misconception.

There are two different types of applications: SWT applications and Eclipse RCP applications.

SWT applications are typically plain Java SE desktop applications (that does not use any runtime except standard) that uses SWT as a library for GUI representation of the program. So SWT applications simply put SWT library (swt.jar) to the classpath of the application.

Eclipse RCP applications use Equinox Runtime (OSGi) in addition to standard Java SE runtime and this  differentiates them from simple SWT applications. Typically Eclipse RCP applications also use SWT for GUI representation but it is not necessarily (for example, you may create a command line Eclipse RCP application that does not have GUI at all).

The minimal download size for SWT applications is really about 4-5MB as you saw on our site http://www.excelsior-usa.com/java-download-size.html (yes, it is simple SWT application there).

The minimal download size for Eclipse RCP applications that use SWT is larger and is about 12-15MB (e.g. check RSSOwl sample at http://www.excelsior-usa.com/protect-eclipse-rcp-applications.html ) due to huge Equinox Runtime in conjunction with other standard bundles (in addition to SWT, JFace and UI Workbench come with a typical Eclipse RCP application.)

To achieve maximum reduction you need to employ Java Runtime Slim-Down technology that is applicable to Eclipse RCP applications as well. See the JET User's Guide, Chapter "Java Runtime Slim-Down" for details on how to enable it -- http://www.excelsior-usa.com/doc/jet650/jetw009.html#0233. Now, we are preparing a live demo for it.

I see another common misunderstanding in your post. As I get, you look at the size of an executable that is created just after compiling (having -native suffix). However, when we talk about download size we mean the size of the resulting installer file  (that may be simple zip) that can be downloaded and installed by end-user. And this installer package contains not only the executable but also the JET Runtime.  All sample installer packages that are placed on our web-site are wrapped by Excelsior Installer that uses advanced techniques for compressing JET-compiled executables and the JET Runtime. So the download size may differ from the size of the executable and it is not correct to look at the size of the executable, if you actually need to keep the download size as small as possible.

Share this post


Link to post
Share on other sites
The minimal download size for Eclipse RCP applications that use SWT is larger and is about 12-15MB (e.g. check RSSOwl sample at http://www.excelsior-usa.com/protect-eclipse-rcp-applications.html ) due to huge Equinox Runtime in conjunction with other standard bundles (in addition to SWT, JFace and UI Workbench come with a typical Eclipse RCP application.)

Note also that 12-15MB is the size of a complete installer that does not have deployment dependencies (JRE installation is not required on target machines).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×