Jump to content
Excelsior Forums
tanelorn

Re: Excelsior JET To Protect Eclipse RCP Applications

Recommended Posts

Hi,

I read your "Secure Eclipse RCP Applications with Excelsior JET" page, and especially the FAQ section, with great interest.

We would like to provide IP protection to one of our applications using AOT compilation.

It is written as a set of Eclipse plug-ins enriching the Ganymede distribution (it's not a standalone RCP application).

If I understand your FAQ properly, this would involve a project setup along the line of:

  • Compile our app plugins using JET 6.5, without retaining the bytecode.
  • Compile the rest of Ganymede using the [tt]-pack[/tt] option (to ensure proper IDE operation).
  • Perhaps exclude from step 2 rarely used plugins, which can be compiled at runtime using JIT if needed.

Am I correct in thinking that:

  • The current JET 6.1 beta 1 version has an "all or nothing" approach which prevents the described setup for now.
  • The GUI which will be provided in following beta versions will enable this kind of fine-tuned compilation (as is already possible with JET 6.0 for "classic" J2SE apps).
  • Similarly to previous JET versions, the GUI will generate freely editable textual project files.

Best regards,

Olivier Parisy.

Share this post


Link to post
Share on other sites

Hello Olivier,

If I understand your FAQ properly, this would involve a project setup along the line of:

You cannot compile a bunch of plugins separately. You should compile these plugins together with a host RCP application (Eclipse IDE in your case) if you would like to protect them.

JET 6.5 will provide a GUI that will allow you to change pack/optimize/protect options for each bundle in your application. This GUI will be similar to the currently used CLASSPATH Grid.

The current JET 6.1 beta 1 version has an "all or nothing" approach which prevents the described setup for now.

In fact you can perform described setup even in  JET 6.5 Beta 1, but it is tricky.

Similarly to previous JET versions, the GUI will generate freely editable textual project files.

Yes.

BTW, have you tried to compile your application with Excelsior JET 6.5 Beta 1? Any feedback would be very appreciated.

Regards,

Vyacheslav Egorov.

Share this post


Link to post
Share on other sites

Hello Olivier,

Hi! Thanks for your time.

You cannot compile a bunch of plugins separately. You should compile these plugins together with a host RCP application (Eclipse IDE in your case) if you would like to protect them.

This is what I understood. I just wanted to point out that I needed diferent [tt]-pack[/tt] options depending on the plug-in.

JET 6.5 will provide a GUI that will allow you to change pack/optimize/protect options for each bundle in your application. This GUI will be similar to the currently used CLASSPATH Grid.

Nice, this is what I expected. May I ask you if the beta 2 will include this GUI?

In fact you can perform described setup even in  JET 6.5 Beta 1, but it is tricky.

Could you provide me with more details? It would be nice to be able to try this now, without having to wait for the GUI.

BTW, have you tried to compile your application with Excelsior JET 6.5 Beta 1? Any feedback would be very appreciated.

Not for now, as the Eclipse IDE will not work without the [tt]-pack[/tt] option, and applying this option to my plug-ins would not be realistic. I may give it a try to ensure things at least run smoothly, but I would definitely prefer to try your "tricky" compilation steps  ;)

Best regards,

Olivier Parisy.

Share this post


Link to post
Share on other sites

BTW, have you tried to compile your application with Excelsior JET 6.5 Beta 1? Any feedback would be very appreciated.

I just tried this. My setup is the following :

  • I installed the beta1 and kept the default profile (1.6.0_07).
  • I copied the [tt]eclipse[/tt] directory of our application (with its plug-ins in [tt]eclipse\plugins[/tt]) in [tt]D:\JETBeta1_Test\eclipse[/tt].
  • My current directory while compiling is [tt]D:\JETBeta1_Test\comp[/tt]
  • I compile using: [tt]jc =ercp D:\JETBeta1_Test\eclipse -pack=none[/tt]

The compiler runs for only a few seconds, then exits without an error message. A (nearly empty) [tt]eclipse_jetpdb[/tt] is created, but nothing else seems to happen.

Since our distribution is large, I also tried to compile with the [tt]-compilerheap=1300m -compilewithfixedheap+[/tt] flags, but the behavior is the same:

D:\JETBeta1_Test\comp>jc =ercp D:\JETBeta1_Test\eclipse -pack=none -compilerheap=1300m -compilewithfixedheap+
Excelsior JET v6.5 beta 1 Evaluation Version (c) Excelsior 1997,2008
Active Java SE Version 1.6.0_07 (profile 7)
************************  JET v6.5 beta 1 EVALUATION **************************
*  This program cannot be used in a business, commercial, government,  *
*  or  institutional  environment  except  for  evaluation  purposes.  *
************************************************************************
Make Eclipse RCP appplication "D:\JETBeta1_Test\eclipse"

Do you have any advice?

Best regards,

Olivier Parisy.

Share this post


Link to post
Share on other sites


Nice, this is what I expected. May I ask you if the beta 2 will include this GUI?
Most probaly no. GUI is scheduled to be included into Beta 3.

Could you provide me with more details? It would be nice to be able to try this now, without having to wait for the GUI.
(1) Launch compiler as described on the Excelsior JET To Protect Eclipse RCP Applications page and terminate it when Parsing Stage starts.
(2) Find a JET project file (most probably it will be called <AppDir>.prj) file in the JET Project Data Base directory  (<AppDir>_jetpdb).

(3) This project will contain a number of !bundle entries looking like this:

!bundle <some path>

!end

Find those corresponding to your plugins and edit them:

!bundle <some path>

  -pack=noncompiled

  -protect=all

  -optimize=all

!end

(4)  Invoke compiler

jc =p "<AppDir>_jetpdb/<AppDir>.prj" -pack=none

-pack=none here means "set -pack option to none by default". It will affect only !bundle-entries which do not contain explicit -pack= assignment.

Please note that: (a) you should perform first step every time you change classes in your bundles and (B) most probably project file format will change in future betas.

Regards,

Vyacheslav Egorov.

Share this post


Link to post
Share on other sites

Do you have any advice?

Please go to the folder <JET_Installation_Dir>\profile1.6.0_07\develop\bin and execute the following command there

gui - ImportResolver.exe

This should output:

OK

After that try to compile your application once more.

Share this post


Link to post
Share on other sites

After that try to compile your application once more.

Thanks, using this and the memory-related flags enabled proper compiler operation.

Sadly, it halted near the end of the compilation process with an assertion error with regard to an EMF class. I posted a more detailed report to java@excelsior-usa.com.

With regard to feedbacks: the compiler seems to be rather robust with respect to memory consumption and large project handling (it could compile 73719 classes out of 96735 before halting). Disk usage seems reasonable too (600Mb of temporary data for an admittedly large >500Mb eclipse directory).

I noticed only one processor core was used, tough. Do you have any plan for multi-core compilation in JET 6.5?

Best regards,

Olivier Parisy.

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

×