The “import java.util.function cannot be resolved” error

后端 未结 8 1524
感动是毒
感动是毒 2021-01-11 12:49

I\'m trying to run this practice script from the standard Oracle Java tutorials.

This seems to be a common error and I\'ve used SO resources to make attempts to fix

8条回答
  •  广开言路
    2021-01-11 13:36

    I ran into this while trying to use Java 9 with Eclipse Oxygen. Eclipse claimed that I was using less than Java 1.8 and asked if I wanted to use 1.8. Saying yes solved the problem, but led to this error message later on.

    I went in to Window => Preferences => Java => Compiler and saw that this had been changed to 1.8, so I changed it back to 9 and everything seems to be working now.

提交回复
热议问题