I reinstalled the packeage and now my ocde is compiling correctly. I copied the jai jar file to the CLASSPATH, then also it is not detecting the package. JAI.create('encode', image, stream, 'tiff') īut it is showing the following compilation errors: PlanarImage image = JAI.create('awtImage', pb,null) īyteArrayOutputStream stream = new ByteArrayOutputStream() ParameterBlock pb = new ParameterBlock() I downloaded and installed the JAI package in my PC and used the following code: