recently I wrote a code to get image (using jfileChooser) and then save it as new picture on hard Drive, and that worked. But when I try to use this code on other computers, or system it didn't work. The MediaTracker always contain a error but I can't display readable information about what going wrong, and I dont have idea how to fix this issue (but I don't won't to read again this source).
Thanks a lot for any ideas what can do wrong.
    JFileChooser jfc = new JFileChooser();
    jfc.setCurrentDirectory(new File("C:\\"));
    jfc.showOpenDialog(null);
    File sf = jfc.getSelectedFile();
    if( sf==null )
        return false;
    String iconName = sf.getAbsolutePath();
    URL imgUrl = null;
    try
    {
        imgUrl = new URL("file:\\"+iconName);
    }
    catch(MalformedURLException murle){
    //plujemy!
        System.out.println(murle);
    }
    imageA = getToolkit().getImage(imgUrl);
    MediaTracker mt = new MediaTracker(this);
    try
    {
        mt.addImage(imageA,0);
        mt.waitForAll();
    }
    catch (InterruptedException ie)
    {
        ie.printStackTrace(new PrintStream(System.out));
        return false;
    }
    if(mt.isErrorAny()){
        return false;
    }else{
        return true;
    }