What is Jrawio. is a pure Java written, used to read the digital camera RAW format file library, support the majority of digital camera manufacturer's format, such as Nikon's NEF and canon of the CR2 format, the specific download and use can refer to the official homepage: http://jrawio.rawdarkroom.org/
The previous jrawio was used as an independent API, and now it's a plug-in, perfect combination with JDK's ImageIO library. As long as you import the Jrawio package into your classpath, you can read raw directly through the Imageio.read ("D:/xx.raw"), and through Imageio.write ("The new file" d:/ Xx.jpg ")) is convenient for converting it to the JPEG format.
Recently using Jrawio in a Java EE project, the project uses Tomcat as the server. The Jrawio jar package has been imported into the project's Lib directory, but the call to Imageio.read returns null and an empty iterator is returned via Imageio.getimagereadersbyformatname ("Nef"). This indicates that the system could not find a jrawio decoder. The magic is that directly write a main function to read RAW files can run normally, so the basic certainty is due to some kind of Java EE operation mechanism caused ImageIO unable to find the appropriate decoder.
View JDK documentation, found that ImageIO has a method: Scanforplugins, can be in the classloader.getresources return path in the scanning plug-in, in the dead horse when the principle of the live horse medical test, incredibly can load into the jrawio. Of course, this process is more resource-intensive and needs to be done once, so it's best to put it in the initialization code for the project.