hi,

i have an applet that's trying to read images in order to process them thru 
java2d-calls. the code i use to read the images follows below.
- whenever i test this locally (thru the browser) without putting applet and 
all inside a JAR, it works ok
- if i put all in a JAR (generated automatically by NetBeans 6.0.1), then it 
works ok if i put the html-file+jar running the applet on a webserver, but if i 
run it locally, i get the error as mentioned in the subject.

anybody any idea??

--------------------------------------
    private BufferedImage readImage(String str) {
        System.out.println("readImage:"+str);
        BufferedImage img = null;
        try {
            //URL url = new URL(getCodeBase(), "images/"+str);
            URL url = getClass().getResource("images/"+str);
            System.out.println("url="+url.toString());
            img = ImageIO.read(url);
        } catch (IOException e) {
            System.out.println("readImage-exception:"+e);
        }
        return (img);
    }
--------------------------

rob willemsen
[Message sent by forum member 'rtwillemsen' (rtwillemsen)]

http://forums.java.net/jive/thread.jspa?messageID=261400

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to