0

I have 2 versions of Java installed, one for tabula-py, and the other for Teradata (work-related). I’ve only been able to get Java 1.8 to work with tabula-py, and 1.7 is what works with our version of Teradata in my company.

I’ve removed any environment variable reference to java, with the exception of version 1.8, which I did by creating its own variable and adding it to the 'PATH' (%JAVA_HOME%\bin). However, it doesn’t matter what I do, it always returns an error that the java filepath doesn’t exist. When I uninstall 1.7 it works every time, but whenever I have it installed it breaks. When I check for the java version on the command line it returns: '''Java version “1.7.0_80”''' I’ve looked through the code, and in util.py I saw that it referenced 'subprocess.check_output' using the code below:

''' res = subprocess.check_output(["java", "-version"], stderr=subprocess.STDOUT) '''

After researching a bit, I read that it has something to do with shell vs echo/bin. I can’t make any sense of it. (Python: Exporting environment variables in subprocess.Popen(..))

Could someone please help me know what I’m doing wrong?

1 Answers1

0

You can use only one version of java at a time, which path is set in environment variable in priority, but alternatively you can set temporary path from command prompt and you can select whatever version you want to use.

In command prompt just use this command

set path=C:\Program Files\Java\jdk1.8.0_161\bin

Note: You have to set path every time when you open command prompt as this is a temporary path.