0

I'm not familiar with stanford coreNLP. I want to use one of its classes Evalb. I've imported all packages (although many of them have errors). class Evalb doesn't have any error. when I run it I got this exception :

Exception in thread "main" java.lang.ExceptionInInitializerError
at edu.stanford.nlp.international.Language.<clinit>(Language.java:15)
at edu.stanford.nlp.parser.metrics.Evalb.usage(Evalb.java:136)
at edu.stanford.nlp.parser.metrics.Evalb.main(Evalb.java:163)
Caused by: java.lang.RuntimeException: Uncompilable source code - package        java.util.function does not exist
at edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams.<clinit>(AbstractTreebankParserParams.java:13)
... 3 more
Java Result: 1

I have installed JDK 1.8

How can I fix this?

user3070752
  • 694
  • 4
  • 23
  • 1
    What is the exact command you are running? And, what is the value of your `JAVA_HOME` variable? This error is from the code not finding Java 8. – Gabor Angeli Jun 02 '15 at 22:22
  • I'm just running this class from my editor (NetBeans) and aslo I have set my `JAVA_HOME` as `C:\Program Files\Java\jdk1.8.0_40` – user3070752 Jun 03 '15 at 05:21
  • Maybe you have to set the JVM in the netbeans configuration to also point to Java 8? Check out: http://stackoverflow.com/questions/10146819/in-netbeans-how-do-i-change-the-default-jdk – Gabor Angeli Jun 03 '15 at 15:51

0 Answers0