Hi in jasper report to generate report I am using ByteOutputStream by importing jar-> import com.sun.xml.messaging.saaj.util.ByteOutputStream; and using below code for same, but for some reasons I am not able to use this jar, please suggest me equivalent alternative for same. Thanks
You should never use classes from com.sun.* or sun.* packages directly in your code. These packages are internal packages in the JDK; they are not part of Java's standard library, and they can change in any new Java version. If you use classes from these packages, your code might be incompatible with future Java versions.
In fact, I think that in Java 8 a new mechanism was added that prevents you from using these packages in your code. If you do it, you will get an error when you run your program.