Getting error with ImageIO.read(getClass().getResourceAsStream (input==NULL)?

前端 未结 2 1295
情书的邮戳
情书的邮戳 2021-01-29 08:07

I keep getting this error when I use the following code:

try    
{
      image=ImageIO.read(getClass().getResourceAsStream(\"build/classes/javaproject/Space.gif\         


        
2条回答
  •  深忆病人
    2021-01-29 08:52

    The promblom is that its A system file so you got too do this:

    ClassLoader.getSystemResourceAsStream

提交回复
热议问题