When using ICODecoder.read(new File("path"));
in IntelliJ IDEA the read is underlined in read and states "java: unreported exception java.io.IOException; must be caught or declared to be thrown" in the build output. How can I fix this?
import net.sf.image4j.codec.ico.ICODecoder;
import java.awt.image.BufferedImage;
import java.io.File;
import java.util.List;
public class GUI {
public GUI() {
List<BufferedImage> imageList = ICODecoder.read(new File("path (it's a proper, valid file path in the actual code)"));
}
public static void main(String[] args) {
new GUI();
}
}
image4j is downloaded from the official site and added as a dependency.