Debugging getResource*

前端 未结 5 774
心在旅途
心在旅途 2021-01-07 22:16

How do you debug getResource-style methods that are failing, returning null?

I am sure the file it\'s looking for is there, but it\'s returning NULL. How do I know w

5条回答
  •  离开以前
    2021-01-07 22:43

    The getResource call is looking for a file relative to the class file.

    My first guess would be that when you have compiled you have forgotten to put the resource files into the compile folder. That's what I've been running on often.

提交回复
热议问题