Override a class in rt.jar

Discussion in 'Java' started by Micha, Dec 12, 2003.

  1. Micha

    Micha Guest

    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
    Micha, Dec 12, 2003
    #1
    1. Advertising

  2. Micha wrote:
    > 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.
    Michael Borgwardt, Dec 12, 2003
    #2
    1. Advertising

  3. Micha

    Jeffrey Palm Guest

    Michael Borgwardt wrote:

    > Micha wrote:
    >
    >> 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.
    >


    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
    --
    Jeffrey Palm --> http://www.ccs.neu.edu/home/jpalm
    Jeffrey Palm, Dec 12, 2003
    #3
  4. Jeffrey Palm wrote:
    >> 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).


    -----
    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.
    Michael Borgwardt, Dec 12, 2003
    #4
  5. "Michael Borgwardt" <> wrote in message
    news:brcfl7$1rqhp$-berlin.de...
    > Jeffrey Palm wrote:
    > >> 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).

    >
    > -----
    > 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 http://www.iviz.com/
    Matt Humphrey, Dec 12, 2003
    #5
  6. Micha

    Jezuch Guest

    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.
    --
    Ecce Jezuch
    "It's always funny until someone gets hurt
    And then it's just hilarious" - M. Patton
    Jezuch, Dec 12, 2003
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cyril
    Replies:
    2
    Views:
    3,853
    cyril
    Aug 25, 2004
  2. Arnold Peters
    Replies:
    0
    Views:
    564
    Arnold Peters
    Jan 5, 2005
  3. muttley
    Replies:
    0
    Views:
    2,714
    muttley
    Oct 20, 2005
  4. cyberco
    Replies:
    4
    Views:
    3,745
    Roedy Green
    Feb 14, 2006
  5. Arnold Peters
    Replies:
    0
    Views:
    653
    Arnold Peters
    Jan 5, 2005
Loading...

Share This Page