I wrote a java code to read an image file in netbeans. it compiled well no errors, but its not showing the image whose path i had declared in the program.
package javaimageiotest;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class JavaImageIOTest
{
public JavaImageIOTest()
{
try
{
// the line that reads the image file
BufferedImage image = ImageIO.read(new File("C:\\Users\\KAISER\\Desktop\\abc.jpg"));
// work with the image here ...
}
catch (IOException e)
{
// log the exception
// re-throw if desired
}
}
public static void main(String[] args)
{
new ImageIOTest();
}
}
this is my code. any ideas or alternate way out needed. thnku :)