Jump to content
Excelsior Forums
k10

Is is possible to protect rt.jar?

Recommended Posts

Hello there,

I evaluated the latest version of your software and would like to ask if there is a way to protect the rt.jar in libs directory which gets distributed. Say for example a hacker alters one of the classes to subvert a part of my code, how does the jvm deal with this?

Share this post


Link to post
Share on other sites

I evaluated the latest version of your software and would like to ask if there is a way to protect the rt.jar in libs directory which gets distributed. Say for example a hacker alters one of the classes to subvert a part of my code, how does the jvm deal with this?

rt.jar is already protected as it is pre-compiled in a set of JET Runtime DLLs/shared libs located in <jet home>\profile1.7.0_40\jre\jetrt

When you prepare your app for deployment with the JetPackII tool, rt.jar is not present in the resulting installation.

Share this post


Link to post
Share on other sites

but it is present in the rt/lib directory when I use the directory deployment method of jetpackII.

Open your project with JetPackII, go to page Runtime and check if the "Java SE API classes" checkbox is enabled in pane Optional Components.

The classes appearing in rt/lib are not used for execution. For more details, see the JET User's Guide, section Optional components.

Share this post


Link to post
Share on other sites

Open your project with JetPackII, go to page Runtime and check if the "Java SE API classes" checkbox is enabled in pane Optional Components.

The classes appearing in rt/lib are not used for execution. For more details, see the JET User's Guide, section Optional components.

did it ,

1st time :

"Java SE API classes" checkbox - disabled , rt.jar is not created in rt/lib directory , but it is still used which is created & accessed from Temp. location.

2nd time :

"Java SE API classes" checkbox - enabled (rt.jar became 30 MB)

, rt.jar is used which is accessed from rt/lib.

if I rename/remove rt.jar in 2nd case , it won't let run .exe

Is there any way to get rid of rt.jar ??, I afraid of byetcode reverse since it works in VM

Share this post


Link to post
Share on other sites

did it ,

1st time :

"Java SE API classes" checkbox - disabled , rt.jar is not created in rt/lib directory , but it is still used which is created & accessed from Temp. location.

Please elaborate on the steps to reproduce this.

Is there any way to get rid of rt.jar ??, I afraid of byetcode reverse since it works in VM

If you compile and package your app with default settings, rt.jar is not used at all and should not be packaged for distribution. When you enable the Global Optimizer, rt.jar will only contain those standard Java library classes that were not precompiled, so most, if not all, of those classes are not actually used by your app.

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

×