tags:

views:

163

answers:

2

I need use the both jars local_policy.jar and US_export_policy.jar with unlimited key size strength. The JRE comes bundled with versions of the jars, with limited key size strength. But I can't replace the original jars in the $JAVA_HOME/lib/security (insufficient rights), so i need them to override (at runtime?) somehow.

Any ideas?

+1  A: 

It would appear that you can override the bootstrap classpath with the -Xbootclasspath JVM argument. See the 'Non-standard options' section of this page for more info.

Jared Russell
Good idea! I tried to use the flag -Xbootclasspath/p to prepend the two jars in the boot classpath. Unfortunately that seems not to work properly. The jars of the original JRE path /lib/security/*.jar will be used..I can use the option -Xbootclasspath, but then I have to copy all lib's required for bootstrapping the vm to the specified path.
ben
A: 

Why does the following way not work?:

java -Xbootclasspath/p:./local_policy.jar:./US_export_policy.jar -cp . MyClass

The -Xbootclasspath/p: option should prepend in front of the bootstrap classpath the two jars. But java still uses the libs out of $JAVA_HOME/lib/security.

Any more ideas?

ben