0

Just download Stanford Core NLP. Ran their "Quick Start" example and it failed.

C:\Program Files\stanford-corenlp-full-2017-06-09>java -cp "*" -Xmx2g edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,lemma,ner,parse,dcoref -file input.txt
Exception in thread "main" java.lang.UnsupportedClassVersionError: edu/stanford/nlp/pipeline/StanfordCoreNLP : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

I also tried their Quick Links called Online demo (Webservice API) and Online demo (Traditional). Both failed to bring up a page.

Not a good start!

user3217883
  • 1,216
  • 4
  • 38
  • 65
  • Check your `java -version`. You probably need to install Java 8. According to the [download page](https://stanfordnlp.github.io/CoreNLP/index.html#programming-languages-and-operating-systems) `Stanford CoreNLP is written in Java; recent releases require Java 1.8+.` – SergGr Jun 21 '17 at 15:40
  • How to switch to java 8? I have both 7 & 8. I set the PATH variable so that java 8 is first in the list. I set the JAVA_HOME variable in both the User variables and System variables section to C:\Program Files\Java\jdk1.8.0_101\bin. Brought up a new command shell and did java -version and it still shows java 7. – user3217883 Jun 22 '17 at 00:29
  • There are not enough details. Try using [`SET`](https://technet.microsoft.com/en-us/library/bb490998.aspx) to show your current `PATH` and `JAVA_HOME`, and [`where`](https://ss64.com/nt/where.html) to see which `java.exe` is used by `cmd.exe`. As a last resort you can specify full path to the specific `java.exe` explicitly. – SergGr Jun 22 '17 at 06:51
  • I found the problem. Some application had uninstalled my java 8 without my knowing or permission. I reinstalled it and now its working. – user3217883 Jun 22 '17 at 14:05

0 Answers0