Topic
2 replies Latest Post - ‏2008-04-03T13:21:02Z by SystemAdmin
SystemAdmin
SystemAdmin
2736 Posts
ACCEPTED ANSWER

Pinned topic Equevalent classess in IBM's JDK implementation.

‏2008-04-03T06:36:49Z |
hello everyone !!
I am working on an JAVA application for Windows. Now we are implementing it in AIX.
IBM's implementation of jdk 1.5 does not have the following classes:

1. com.sun.org.apache.xml.internal.serialize.OutputFormat;
2. com.sun.org.apache.xml.internal.serialize.XMLSerializer;

Which causes errors in our project. Would appreciate if anyone can tell, what are equivalent classes of those in IBM's implementation of jdk 1.5.

This is my first post and I am new to AIX and IBM technologies. Would be expecting a good start in IBM technologies :-)

Thanks in advance......
Updated on 2008-04-03T13:21:02Z at 2008-04-03T13:21:02Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    2736 Posts
    ACCEPTED ANSWER

    Re: Equevalent classess in IBM's JDK implementation.

    ‏2008-04-03T12:04:35Z  in response to SystemAdmin
    Hi,

    OK, this comes about because Sun decided to rename some Apache classes when they shipped them. The original name for these classes should be as follows:

    com.sun.org.apache.xml.internal.serialize.OutputFormat -> org.apache.xml.serialize.OutputFormat

    and

    com.sun.org.apache.xml.internal.serialize.XMLSerializer -> org.apache.xml.serialize.XMLSerializer

    There is a discussion of the name changing scheme here:

    http://java.sun.com/webservices/docs/2.0/jaxp/JAXP-Compatibility_150.html#packageNames

    IBM ships these classes with their original apache named packages.

    You should not really be using classes (as pointed out by the previous document) that start with "com.sun." packages as these classes are not guaranteed to be present across releases (e.g. 5.0 to 6.0) even between service releases. The following sun page talks about "sun." package but this applies to the "com.sun.*" packages as well (http://java.sun.com/products/jdk/faq/faq-sun-packages.html)

    I would recommend you use see if you can refactor your code to only use the javax.xml package classes rather than the under lying implementation classes to insure compatibility with all JVM vendors. If you really must use these classes then use the org.apache versions and use the endorsed directory or add the apache jars to the classpath to include the original packages when running on the Sun JVM to ensure that they are always available.

    Ben Hardill.
    • SystemAdmin
      SystemAdmin
      2736 Posts
      ACCEPTED ANSWER

      Re: Equevalent classess in IBM's JDK implementation.

      ‏2008-04-03T13:21:02Z  in response to SystemAdmin
      thanxx a lot sir,
      I will let our AIX team know about that.