IOException can not be resolved to a type error

后端 未结 4 528
清歌不尽
清歌不尽 2021-01-14 10:09

For my final in Java we have a \"exceptions\" part on the test with try, catch, and finally calls. When I try to put the example code into Eclipse I get errors in the catch

相关标签:
4条回答
  • 2021-01-14 10:56

    I think it's worth mentioning that in Eclipse, Ctrl+Shif+O does the job of resolving the imports for you.

    0 讨论(0)
  • 2021-01-14 10:59

    I discovered I was using an old version of JWT , the issue is gone after using the a newer version of JWT dependency .

    0 讨论(0)
  • 2021-01-14 11:00

    Oh, guess I could answer my own question here. Didn't know I had to import the IOException from java.io!

    0 讨论(0)
  • 2021-01-14 11:14

    Easy to just use

    import java.io.*
    

    for the imports

    0 讨论(0)
提交回复
热议问题