0

I'm trying to make Standford NER package to work on my mac. Using anaconda and python 2.7 (iPython notebook). I was following the steps given here: http://www.nltk.org/api/nltk.tag.html#module-nltk.tag.stanford. While executing the last step, it gave me UnsupportedClassVersionError.."xy.z" is "52.0" which means I need to upgrade to java 8. I upgraded to Java 8, but my java -version command still showing java 7. So I tried to fix it using the solution given here: After upgrading to Java8, javac still shows 1.7. Instead of removing, I renamed the directory. These are the following commands I exec:

cd /System/Library/Frameworks/JavaVM.framework/Versions/
mv Current Current_Old
ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/ Current

Then after that java -version command is not working. I realized the directory name is incorrect and tried to replace it back using mv Current_Old Current, still the command is not working.

how can I restore my java?

Community
  • 1
  • 1
psun
  • 615
  • 10
  • 13
  • Disclaimer: Not a mac user. But I think `rm Current` should remove the symbolic link. If you would like to be safe, i think `unlink Current` should also work. – alvas Mar 26 '16 at 17:23

1 Answers1

0

Able to get it working again! All I did was restored legacy Java 6 from this link: https://support.apple.com/kb/DL1572?locale=en_US

Then java -version was even showing me the latest version which is Java 1.8. Able to start Java IDE now.

psun
  • 615
  • 10
  • 13