Override a class in rt.jar

M

Micha

Hi,

I have developed an application that uses the Apache Xalan classes.
Everything works fine when running java 1.2. But when I run it using
java 1.4.1_02 things are very slow. The reason: the rt.jar from
1.4.1_02 include the Xalan classes, but an old version of them. Is
there a way I can make java load the classes from the Xalan.jar (which
I specify on the commandline with the -cp option) in stead of the
classes from the rt.jar?

Thanks,
Micha
 
M

Michael Borgwardt

Micha said:
I have developed an application that uses the Apache Xalan classes.
Everything works fine when running java 1.2. But when I run it using
java 1.4.1_02 things are very slow. The reason: the rt.jar from
1.4.1_02 include the Xalan classes, but an old version of them. Is
there a way I can make java load the classes from the Xalan.jar (which
I specify on the commandline with the -cp option) in stead of the
classes from the rt.jar?

You'll have to use the -Xbootclasspath option to achieve that. Theoretically,
that violates the JRE license, but I doubt anyone cares in that case.
 
J

Jeffrey Palm

Michael said:
You'll have to use the -Xbootclasspath option to achieve that.
Theoretically,
that violates the JRE license, but I doubt anyone cares in that case.

What part of the license does it violate -- just out of curiosity. If
that's a problem you could define your own classloader if this doesn't
violate it in the same way (hack).

Jeff
 
M

Michael Borgwardt

Jeffrey said:
What part of the license does it violate -- just out of curiosity. If
that's a problem you could define your own classloader if this doesn't
violate it in the same way (hack).

-----
Binary Code License Agreement, SUPPLEMENTAL LICENSE TERMS,
D. Java Technology Restrictions:

You may not modify the Java Platform Interface ("JPI", identified as classes contained
within the "java" package or any subpackages of the "java" package), by creating
additional classes within the JPI or otherwise causing the addition to or modification of
the classes in the JPI. In the event that you create an additional class and associated
API(s) which (i) extends the functionality of the Java platform, and (ii) is exposed to
third party software developers for the purpose of developing additional software which
invokes such additional API, you must promptly publish broadly an accurate specification
for such API for free use by all developers. You may not create, or authorize your
licensees to create, additional classes, interfaces, or subpackages that are in any way
identified as "java", "javax", "sun" or similar convention as specified by Sun in any
naming convention designation.
-----

The point is that Sun wants the funactionality and behaviour of the core Java platform
to be fixed, to avoid compatibility issues.

Now that I read it again, it probably doesn't even apply in this particular case.
 
M

Matt Humphrey

Michael Borgwardt said:
-----
Binary Code License Agreement, SUPPLEMENTAL LICENSE TERMS,
D. Java Technology Restrictions:

You may not modify the Java Platform Interface ("JPI", identified as classes contained
within the "java" package or any subpackages of the "java" package), by creating
additional classes within the JPI or otherwise causing the addition to or modification of
the classes in the JPI. In the event that you create an additional class and associated
API(s) which (i) extends the functionality of the Java platform, and (ii) is exposed to
third party software developers for the purpose of developing additional software which
invokes such additional API, you must promptly publish broadly an accurate specification
for such API for free use by all developers. You may not create, or authorize your
licensees to create, additional classes, interfaces, or subpackages that are in any way
identified as "java", "javax", "sun" or similar convention as specified by Sun in any
naming convention designation.
-----

The point is that Sun wants the funactionality and behaviour of the core Java platform
to be fixed, to avoid compatibility issues.

Now that I read it again, it probably doesn't even apply in this particular case.

In the early days of Java 2, we commonly had to unpack the rt.jar, remove
the (broken) Corba classes and replace them.

Cheers,
Matt Humphrey (e-mail address removed) http://www.iviz.com/
 
J

Jezuch

U¿ytkownik Micha napisa³:
I have developed an application that uses the Apache Xalan classes.
Everything works fine when running java 1.2. But when I run it using
java 1.4.1_02 things are very slow. The reason: the rt.jar from
1.4.1_02 include the Xalan classes, but an old version of them. Is
there a way I can make java load the classes from the Xalan.jar (which
I specify on the commandline with the -cp option) in stead of the
classes from the rt.jar?

Not sure if this can help, but anyway:
http://java.sun.com/j2se/1.4.2/docs/guide/standards/
I think this does apply to Xalan in rt.jar.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top