Debugging getResource*

前端 未结 5 777
心在旅途
心在旅途 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:30

    You could use the Eclipse-debug-mode and set a breakpoint on the method that fails. From there you can go step by step down in the call tree until you see what fails.

    Most common is that the file isn't there because it wasn't copied there or isn't in the classpath etc...

提交回复
热议问题