epfml / sent2vec

General purpose unsupervised sentence representations
Other
1.19k stars 256 forks source link

OSError: Java command failed #80

Closed MeltemTutar closed 5 years ago

MeltemTutar commented 5 years ago

I'm getting a OSError: Java command failed, where the following is resulting in the error:

tknzr = StanfordTokenizer(SNLP_TAGGER_JAR, encoding='utf-8') tknzr.tokenize(sentence)

I'm not sure the easiest way to fix this.

MeltemTutar commented 5 years ago

This was because I needed to add the java path to my local path. Running the following in terminal fixed the issue, but I have to run it every time.

export JAVA_HOME=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home

Inspired by this stack overflow post: https://stackoverflow.com/questions/44009058/even-though-jre-8-is-installed-on-my-mac-no-java-runtime-present-requesting-t.

mpagli commented 5 years ago

Thanks for reporting!