Excalibur Components
  1. Excalibur Components
  2. EXLBR-34

excalibur-instrument-mgr-http uses com.sun.* classes

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: Instrumentation
    • Labels:
      None
    • Environment:
      Gentoo/Linux / FOSS stack

      Description

      FOSS implementations of Java don't use com.sun.* classes and they will also probably go away from Sun JDK in 1.7 too. This is the output with sun-jdk-1.6:

      compile:
      [mkdir] Created dir: /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/target/classes
      [javac] Compiling 34 source files to /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/target/classes
      [javac] /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/src/java/org/apache/excalibur/instrument/manager/http/FavIconHandler.java:20: warning: com.sun.image.codec.jpeg.JPEGCodec is Sun proprietary API and may be removed in a future release
      [javac] import com.sun.image.codec.jpeg.JPEGCodec;
      [javac] ^
      [javac] /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/src/java/org/apache/excalibur/instrument/manager/http/FavIconHandler.java:21: warning: com.sun.image.codec.jpeg.JPEGEncodeParam is Sun proprietary API and may be removed in a future release
      [javac] import com.sun.image.codec.jpeg.JPEGEncodeParam;
      [javac] ^
      [javac] /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/src/java/org/apache/excalibur/instrument/manager/http/FavIconHandler.java:22: warning: com.sun.image.codec.jpeg.JPEGImageEncoder is Sun proprietary API and may be removed in a future release
      [javac] import com.sun.image.codec.jpeg.JPEGImageEncoder;
      [javac] ^
      [javac] /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/src/java/org/apache/excalibur/instrument/manager/http/SampleChartHandler.java:20: warning: com.sun.image.codec.jpeg.JPEGCodec is Sun proprietary API and may be removed in a future release
      [javac] import com.sun.image.codec.jpeg.JPEGCodec;
      [javac] ^
      [javac] /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/src/java/org/apache/excalibur/instrument/manager/http/SampleChartHandler.java:21: warning: com.sun.image.codec.jpeg.JPEGEncodeParam is Sun proprietary API and may be removed in a future release
      [javac] import com.sun.image.codec.jpeg.JPEGEncodeParam;
      [javac] ^
      [javac] /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/src/java/org/apache/excalibur/instrument/manager/http/SampleChartHandler.java:22: warning: com.sun.image.codec.jpeg.JPEGImageEncoder is Sun proprietary API and may be removed in a future release
      [javac] import com.sun.image.codec.jpeg.JPEGImageEncoder;
      [javac] ^
      [javac] /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/src/java/org/apache/excalibur/instrument/manager/http/SampleChartHandler.java:235: warning: com.sun.image.codec.jpeg.JPEGImageEncoder is Sun proprietary API and may be removed in a future release
      [javac] JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder( os );
      [javac] ^
      [javac] /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/src/java/org/apache/excalibur/instrument/manager/http/SampleChartHandler.java:235: warning: com.sun.image.codec.jpeg.JPEGCodec is Sun proprietary API and may be removed in a future release
      [javac] JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder( os );
      [javac] ^
      [javac] /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/src/java/org/apache/excalibur/instrument/manager/http/SampleChartHandler.java:236: warning: com.sun.image.codec.jpeg.JPEGEncodeParam is Sun proprietary API and may be removed in a future release
      [javac] JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam( bi );
      [javac] ^
      [javac] 9 warnings
      [copy] Copying 2 files to /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/target/classes
      [copy] Copying 2 files to /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/target/classes

      junit-present:
      [echo] ================================= WARNING ================================
      [echo] Junit isn't present in your $

      {ANT_HOME}

      /lib directory. Tests not executed.
      [echo] ==========================================================================

      compile-tests:

      internal-test:

      test:

      jar:
      [jar] Building jar: /var/tmp/portage/dev-java/excalibur-instrument-2.1/work/excalibur-instrument-mgr-http-2.1/target/excalibur-instrument-mgr-http-2.1.jar

      Grepping trunk:
      betelgeuse@pena /mnt/checkouts/excalibur-trunk $ grep com.sun -r .
      ./cornerstone/sockets/impl/src/java/org/apache/avalon/cornerstone/blocks/sockets/.svn/text-base/SSLFactoryBuilder.java.svn-base: java.security.Security.addProvider( new com.sun.net.ssl.internal.ssl.Provider() );
      ./cornerstone/sockets/impl/src/java/org/apache/avalon/cornerstone/blocks/sockets/SSLFactoryBuilder.java: java.security.Security.addProvider( new com.sun.net.ssl.internal.ssl.Provider() );
      ./containerkit/instrument/mgr-http/src/java/org/apache/excalibur/instrument/manager/http/.svn/text-base/FavIconHandler.java.svn-base:import com.sun.image.codec.jpeg.JPEGCodec;
      ./containerkit/instrument/mgr-http/src/java/org/apache/excalibur/instrument/manager/http/.svn/text-base/FavIconHandler.java.svn-base:import com.sun.image.codec.jpeg.JPEGEncodeParam;
      ./containerkit/instrument/mgr-http/src/java/org/apache/excalibur/instrument/manager/http/.svn/text-base/FavIconHandler.java.svn-base:import com.sun.image.codec.jpeg.JPEGImageEncoder;
      ./containerkit/instrument/mgr-http/src/java/org/apache/excalibur/instrument/manager/http/.svn/text-base/SampleChartHandler.java.svn-base:import com.sun.image.codec.jpeg.JPEGCodec;
      ./containerkit/instrument/mgr-http/src/java/org/apache/excalibur/instrument/manager/http/.svn/text-base/SampleChartHandler.java.svn-base:import com.sun.image.codec.jpeg.JPEGEncodeParam;
      ./containerkit/instrument/mgr-http/src/java/org/apache/excalibur/instrument/manager/http/.svn/text-base/SampleChartHandler.java.svn-base:import com.sun.image.codec.jpeg.JPEGImageEncoder;
      ./containerkit/instrument/mgr-http/src/java/org/apache/excalibur/instrument/manager/http/SampleChartHandler.java:import com.sun.image.codec.jpeg.JPEGCodec;
      ./containerkit/instrument/mgr-http/src/java/org/apache/excalibur/instrument/manager/http/SampleChartHandler.java:import com.sun.image.codec.jpeg.JPEGEncodeParam;
      ./containerkit/instrument/mgr-http/src/java/org/apache/excalibur/instrument/manager/http/SampleChartHandler.java:import com.sun.image.codec.jpeg.JPEGImageEncoder;
      ./containerkit/instrument/mgr-http/src/java/org/apache/excalibur/instrument/manager/http/FavIconHandler.java:import com.sun.image.codec.jpeg.JPEGCodec;
      ./containerkit/instrument/mgr-http/src/java/org/apache/excalibur/instrument/manager/http/FavIconHandler.java:import com.sun.image.codec.jpeg.JPEGEncodeParam;
      ./containerkit/instrument/mgr-http/src/java/org/apache/excalibur/instrument/manager/http/FavIconHandler.java:import com.sun.image.codec.jpeg.JPEGImageEncoder;

      Please use javax.imageio.plugins.jpeg so that your code can be used by more people.

        Activity

        Hide
        Petteri Räty added a comment -

        I should also point out that the ibm-jdk does not have com.sun.* classes so currently your code is not usable for ppc users.

        Show
        Petteri Räty added a comment - I should also point out that the ibm-jdk does not have com.sun.* classes so currently your code is not usable for ppc users.
        Hide
        Petteri Räty added a comment -

        Well Sun has EOLed 1.3 so I don't think people should be using it i production.

        Show
        Petteri Räty added a comment - Well Sun has EOLed 1.3 so I don't think people should be using it i production.
        Hide
        Leif Mortenson added a comment -

        Perreri,
        Thanks for pointing that out. It is not an API I had been aware of... As familiar as I am with Java, I am still surprised by what is there from time to time. :-/

        The thing is, is this an API we can use? What is the minimum version requirement that we are currently building for. The javax.imageio package was added in 1.4. Are we still supporting 1.3? Personally, I usually use 1.4 and will probably make the move to 1.5 soon now that 1.6 is out.

        Cheers,
        Leif

        Show
        Leif Mortenson added a comment - Perreri, Thanks for pointing that out. It is not an API I had been aware of... As familiar as I am with Java, I am still surprised by what is there from time to time. :-/ The thing is, is this an API we can use? What is the minimum version requirement that we are currently building for. The javax.imageio package was added in 1.4. Are we still supporting 1.3? Personally, I usually use 1.4 and will probably make the move to 1.5 soon now that 1.6 is out. Cheers, Leif
        Show
        Petteri Räty added a comment - What's wrong with javax.imageio.plugins.jpeg? http://developer.classpath.org/mediation/ClasspathMigration#head-d4ee9efe53a641e29ffdcd96e985bf38bbc671c1
        Hide
        Leif Mortenson added a comment -

        I had implemented it this way originally to keep the jar simple and avoid external dependencies.
        I think the only solution is to add a dependency on JAI, the imaging library. It is a Sun proprietary jar like java mail however and will not be available on ibiblio. I already use it in many of my own projects so this is not a issue for me personally, but it does add to the list of jars that a new user will have to go in search of manually. Is anyone aware of any alternatives?

        Cheers,
        Leif

        Show
        Leif Mortenson added a comment - I had implemented it this way originally to keep the jar simple and avoid external dependencies. I think the only solution is to add a dependency on JAI, the imaging library. It is a Sun proprietary jar like java mail however and will not be available on ibiblio. I already use it in many of my own projects so this is not a issue for me personally, but it does add to the list of jars that a new user will have to go in search of manually. Is anyone aware of any alternatives? Cheers, Leif

          People

          • Assignee:
            Leif Mortenson
            Reporter:
            Petteri Räty
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development