Suggestions for a custom bootstrap class loader

George H george.dma at gmail.com
Tue Jun 1 00:21:40 PDT 2010


Hi,

I have in mind a feature that I would like to see in the OpenJDK and I
was reading on the OpenJDK webpage that it is better to discuss a new
feature first on the mailing list before starting on it. And I have a
few questions to ask. Thought if anyone could provide me with insight,
tips and some sort of starting point it would be on this mailing list.

My ultimate goal to have the virtual machine load encrypted java
byte-byte code. Yes, its the age old protecting intellectual property
(IP) routine.
Doing this with a custom class loader in Java is out of the question.
I believe the best way to do this is through the bootstrap class
loader which is written natively. I was hoping of trying to do the
following.

1: Be able to supply a cryptographic key to the VM so that it may use
it to decrypt/encrypt bytecode on the fly

and/or

2. Be able to register a second bootstrap class loader that performs
the on the fly encryption/decryption on the fly, and I can call it
from inside java programs.

I was thinking that this might be a nice feature for everyone to use
especially if point No.1 is done. The VM will be better adopted by
persons and entities who require protection from decompiling class
files. It would certainly make it easier than having to deploy a
custom built OpenJDK variant that will load encrypted class files.


Currently I have looked at
"openjdk-6-src-b19-15_apr_2010\hotspot\src\share\vm\classfile\classLoader.cpp"
and I wonder if there is any more documentation about this file and
the whole bootstrap class loading process.

What are your suggestions, opinions and responses? I am eager to know
if this is something many people want or just me?
I am probably going to inevitably try to do this so any help in
getting to know the OpenJDK source code would be great.

Thanks
--
George


More information about the hotspot-dev mailing list