Jump to content
Excelsior Forums
betterhao

Ask one question about JET 3.11

Recommended Posts

At this time, standalone (JRE-independent) executables are feasible only for applications not using Swing/AWT.

JET compiles .class files to native code but it requires JRE for AWT toolkit. In fact, JET needs only native method DLLs from JRE and other parts are not required (for instance, the huge rt.jar is absolutely useless for JET). Technically, it is very simple to extract those DLLs from JRE and everything will work. Unfortunately, Sun's license requires to remain JRE "as is" when redistributing.

If you bundle, for instance, JRE 1.3.x to your archive with the help of JetPackII, it adds +11M to

its size.

Note that  it is not affordable to re-write AWT native methods from scratch as we did that for java.lang, java.io, java.net and java.zip. In such case, it is impossible to get rid of JRE.

We hope things will make better, if Sun changes that policy or we are able to get a proper license.

Now, a possible solution is SWT which allows you to create Java GUI applications of a relatively small size.

http://www.excelsior-usa.com/jetswt.html

Share this post


Link to post
Share on other sites

Given that this contradicts Sun licensing (but does not apply in our case anyway), could you please describe the steps necessary to create such Swing-based JRE-less application? In other words, where should I place the JRE dlls and how can I make the Excelsior-compiled application find them? When I put jawt.dll in the same directory as the exe, the executable complains that it cannot find the Swing components...

Thanks!

Share this post


Link to post
Share on other sites

paul,

It is not possible to make your compiled application work with just the JRE native method DLLs without hacking JET runtime. Our product makes sure you do not break the JRE Binary Code License. :)

If you mean your company has the JRE Source Code License, we could create a custom version of Excelsior JET for you not having that restriction.

Contact us at java@excelsior-usa.com for details.

Share this post


Link to post
Share on other sites

Yo shell,

you said,

At this time, standalone (JRE-independent) executables are feasible only for applications not using Swing/AWT.

?

JET compiles .class files to native code but it requires JRE for AWT toolkit. In fact, JET needs only native method DLLs from JRE and other parts are not required (for instance, the huge rt.jar is absolutely useless for JET).

--------------------------------------------

This is not true. Because if rt.jar is removed from the jre, HTML components does not render properly. For example, multilined JLabels (html text) appear with blank text

Uditha Nagahawatta

Share this post


Link to post
Share on other sites

You're right. It would be better to say that class files from rt.jar are absolutely useless for JET and the classes occupy the main part of rt.jar.

shell

Share this post


Link to post
Share on other sites

I don't understand what you are trying to say shell.

Are you saying rt.jar should be included in the distribution ( according to the sun license, yes ) or not?

What I say is Swing does not work properly without it.

Share this post


Link to post
Share on other sites

I meant that if and when we get the OEM JRE source code license,  you will be able to include a small version of rt. jar, containing resources only, with your application. That would dramatically reduce the size of installation packages for Swing-based applications.

shell

Share this post


Link to post
Share on other sites

Snowman,

I'm not sure whether I understand it correctly, but given I work at a university and the product we are developing is a non-profit, Sun seems to give the Source Code License for free (and I'm a registered developer). According to Sun, "There is no charge to access Community Source Code for research and development purposes".

I own a registered version of Jet Pro.

Could you please send me a link to such an enabled version to my email (it's the same one to which Jet Pro is registered) or should I do anything else to get it?

Share this post


Link to post
Share on other sites

We are sorry, but your email does not appear in our customer database. You must have used a different email when ordering the product. Or perhaps you ordered through a reseller?

In any case, please email some proof of purchase to us at java@excelsior-usa.com.

Share this post


Link to post
Share on other sites

×