I installed the python module tabula-py which is apparently based on the Java version of tabula. When I try to run it I get an error saying that the wrong version of Java is installed, but when I check in system perferences on MacOS it says I've got the latest version (Version 8 update 151). On the github page it mentions that java has to be added to PATH, so I tried doing this from these instructions http://www.baeldung.com/java-home-on-windows-7-8-10-mac-os-x-linux, but it still says I've got version 1.6 installed.
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Any help would be appreciated to get the plugin working.
This is the error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: technology/tabula/CommandLineApp : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
This answer on the github issues page fixed the problem. https://github.com/chezou/tabula-py/issues/54
sudo mv /usr/bin/java /usr/bin/java-1.6
sudo ln -s /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java /usr/bin/java