LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Java: Overriding a class in /usr/java1.3/jre/lib/ext ??? (https://www.linuxquestions.org/questions/programming-9/java-overriding-a-class-in-usr-java1-3-jre-lib-ext-351984/)

stefanlasiewski 08-10-2005 06:25 PM

Java: Overriding a class in /usr/j2se/jre/lib/ext ???
 
Hi everyone,

I would like to override these classes contained in /usr/j2se/jre/lib/ext .
The jars contain expired certificates, so some security classes are breaking.

jce1_2_1.jar
US_export_policy.jar
local_policy.jar
sunjce_provider.jar

I do not have sufficient permissions to modify /usr/j2se, so I cannot simply replace the jars.

So I placed 4 new jars in the following directory:

/prod/jce1.2.2/

I startup the application, and my CLASSPATH looks like this:

/prod/jce1.2.2/:/prod/APPLICATION_DIR/lib

However, the application still appears to be grabbing the classes from /usr/j2se/jre/lib/ext/ instead of from /prod/jce1.2.2 .

Shouldn't the CLASSPATH override the classes in /usr/java1.3/jre/lib/ext?

I appreciate your help.

stefanlasiewski 08-11-2005 06:14 PM

I think I found the answer.

Normally, you cannot override those core classes. See here:

http://java.sun.com/docs/books/tutor...sics/load.html

However, you can sometimes override the core classes with "-Xbootclasspath".


All times are GMT -5. The time now is 07:19 AM.