cannot find symbol: method forEach((f,i)->res[...]), f))
johnny0213 opened this issue · comments
Hi there,
I run into a compile error:
FastText.java:860: error: cannot find symbol
map.forEach((f, i) -> res.put(dict.getLabel(i), f));
^
symbol: method forEach((f,i)->res[...]), f))
location: variable map of type TreeMultimap<Float,Integer>
Any hint? Thanks!
Hello.
Obviously, the main hints can be found in stackoverflow: https://stackoverflow.com/questions/25706216/what-does-a-cannot-find-symbol-compilation-error-mean
It is a compilation error,
but it cannot be caused by the mistake in the code of this project:
the code has been checked a thousand times,
the project has tests, maven jars, runnable jar, and it is used by another people.
So, most likely, it is related to your working environment, the way to run or to your IDE.
I'm not sure, but I can assume that you are using Eclipse IDE and the error is related to its setting regarding to the Java path.
Well, you can either review these settings by yourself (and also it is need to make sure that java8+ is installed in the system) or switch to a normal IDE, for example Intellij Idea (it is not related to the question, but, honestly, I don't understand why people always choose a worse thing, when a better choose is available)