Jump to content
Excelsior Forums
Sign in to follow this  
kornelio

Compilation options in Excelsior 6.5 Beta

Recommended Posts

Hi guys,

we are interested in protecting our Eclipse-based RCP using Excelsior technology, which certainly fits our needs (only with 6.5 RCP support). Our product is of medium size, let's say around 350 bundles. Some of these bundle contain critical data in the form of XML files. We are targeting Windows XP platform.

So our objective is to get all critical bundles compiled and encrypted into the main .exe. However, and using the provided GUI for latest beta 3, I've found some limitations.

First, I tried default compilation options (using "typical" compilation preset). My first problem was that lots of consistency warnings/errors came up from the consistency check. I decided to ignore them, It would be great if you guys could provide some guidelines on how to fix these consistency problems.

After leaving my computer compiling the whole night, I saw the result the next morning: a 359MB native executable. It did actually work! But I didn't achieve what I wanted: most of my critical propietary bundles weren't compiled inside the main .exe, they were just left as-is. Fair enough for a "typical" preset.

So my next step was to customize the compilation options. Please take into account that I'm making many assumptions, so please correct me when needed.

I realized the compilation options were quite constrained.

The "Pack into exe" Option: there are 3 possible values: auto-detect, original jar/zip and none. The thing is that if you set original jar/zip, the GUI warns you that you won't be able to protect your code (:huh:). Then, if want to protect my code, I would need to leave it as .jar files (and the point of excelsior was making java code native!). Furthermore, the bundles didn't look like protected after the compilation (not even .class obfuscation).

So in the end, the result of the compilation process was:

- Unprotected compiled code in a main exe

and

- (unprotected) .jar bundles

Whereas my objective was to get

- Compiled and protected code

Do I miss something? What am I missinterpretting from the results of the compilation process?

How can I tweak compilation options to obtain:

- a single all-in .exe file

- all code should be natively compiled and protected (and desirable, optimized)

- non-java artifacts (lets say, XML files) should be, at least, encrypted and packed in the .exe as well.

Thanks in advance!

Share this post


Link to post
Share on other sites

Guys,

I just realized that .jar bundles are left in the plugins directory after compilation, but they can be actually be removed, their functionality is packed in the .exe. Sorry for the confusion.

Now I just need to check the content of that exe, although is too big to be opened by my text editors! :)

Share this post


Link to post
Share on other sites

I just realized that .jar bundles are left in the plugins directory after compilation, but they can be actually be removed, their functionality is packed in the .exe. Sorry for the confusion.

Yes, you may use xpack utility now to make such "removing" automatically:

xpack -source AppDir -target TargetDir

then TargetDir will not contain your jars and moreover it could be copied to another PC and work there.

To improve protection of .xml files that are packed into exe you may enable "Encrypt strings and resources" setting on the Page Target of JET Control Panel. After that you should not see any readable strings that are critical for you to hide in the executable :)

Share this post


Link to post
Share on other sites

Hi kit,

Thanks for your support. The xpack hint did the trick :P

I've tried the resulting product and works great!

I've noticed that non-jar plugins are not included in the .exe file. Is it possible to include them?

Regarding "Encrypt strings and resources", I just saw it, that's perfect for us, thanks!

Finally, when are you planning to release 6.5? We are releasing our product soon, so we really need it as soon as possible :P Will it have the same costs as 6.4 (just to have an estimation for our budget). Do you think it is possible to reach an agreement to pay for a license for the beta version, and we take the risk :P?

Kind Regards.

Share this post


Link to post
Share on other sites

Thanks for your support. The xpack hint did the trick :P

I believe that the final version of Eclipse RCP support in Excelsior JET will include full featured JetPackII graphical tool that will allow you to wrap resulting application into Excelsior Installer.

I've noticed that non-jar plugins are not included in the .exe file. Is it possible to include them?

Nevertheless they should not contain original classes and jar files but only resources. To pack them as a whole, just choose "original jar/zip" item of "Pack into exe" combobox in the Classpath Grid of Classpath Page of the JET Control Panel (you see, texts are in beta stage now :) ). However be very careful with this! If you have native code libraries that accesses non-jar resources directly the resulting application may not work because non-java native code has no knowledge where the packed resources are. That's why default mode for directory plugins does not pack them into exe as a whole.  The typical misbehavior you may see -- if you have directory plugin that contains welcome screen resources,  then after packing the resources into exe, the welcome screen will not appear correctly, because Eclipse shows welcome screen via MS Internet Explorer that will not find the resources in the executable. On the contrary, if you make such plugin as a jar, everything will work after packing because Eclipse Runtime retrieves required resources  into "configuration" directory for IE before showing in this case and since Eclipse Runtime is Java code we know how to feed it packed-into-exe resources.

Finally, when are you planning to release 6.5? We are releasing our product soon, so we really need it as soon as possible :P Will it have the same costs as 6.4 (just to have an estimation for our budget). Do you think it is possible to reach an agreement to pay for a license for the beta version, and we take the risk :P?

We are planning to release Excelsior JET 6.5 in 1Q 2009.  Regarding the license for the beta, I do not think so, but you'd better to contact our Support or Sales department with this at "java at excelsior-usa.com" and "sales at excelsior-usa.com" respectively.

Share this post


Link to post
Share on other sites
Nevertheless they should not contain original classes and jar files but only resources. To pack them as a whole, just choose "original jar/zip" item of "Pack into exe" combobox in the Classpath Grid of Classpath Page of the JET Control Panel (you see, texts are in beta stage now :) ). However be very careful with this! If you have native code libraries that accesses non-jar resources directly the resulting application may not work because non-java native code has no knowledge where the packed resources are. That's why default mode for directory plugins does not pack them into exe as a whole.  The typical misbehavior you may see -- if you have directory plugin that contains welcome screen resources,  then after packing the resources into exe, the welcome screen will not appear correctly, because Eclipse shows welcome screen via MS Internet Explorer that will not find the resources in the executable. On the contrary, if you make such plugin as a jar, everything will work after packing because Eclipse Runtime retrieves required resources  into "configuration" directory for IE before showing in this case and since Eclipse Runtime is Java code we know how to feed it packed-into-exe resources.

I see. What you describe sounds reasonable. I think we should pack things in .jar files whenever possible :)

We are planning to release JET 6.5 in the middle of March 2009.  Regarding the license for the beta, I do not think so, but you'd better to contact our Support or Sales department with this at "java at excelsior-usa.com" and "sales at excelsior-usa.com" respectively.

Good! Looking forward to the official release :D We are quite happy with the results, I belive excelsior new version will attract many eclipsers :P I'll try to contact sales and support department.

Thanks for your support, Kit! Really appreciated :)

Cheers.

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  

×