Waldo Gerber
Waldo Gerber

Reputation: 11

How to solve OSError: [WinError 126] JVM DLL not found when trying to use jaydebeapi in python 3.11 to make a database connection

I am trying to make a database connection using the Jaydebeapi package in Python3. My setup is running on a windows 2016 server. I have Java 8 and JDK installed. When I execute my script it returns the below error:

OSError: [WinError 126] JVM DLL not found: C:\Program Files\Java\jre1.8.0_60\bin\server\jvm.dll

When I run the script on my personal PC it works fine and I am using all the same software versions.

I can't find a solution anywhere else online.

Upvotes: 1

Views: 1879

Answers (2)

Waldo Gerber
Waldo Gerber

Reputation: 11

SOLVED:

I began to suspect that the version of Java that I installed required an internet connection so I downloaded a different version of java (jdk-8u341-windows-x64 offline) and installed that. After doing this I corrected the JAVA_HOME path and this ended up solving the problem.

Upvotes: 0

THEdude
THEdude

Reputation: 11

Have you tried:

  • Reinstalling Java
  • Copying the jvm.dll file over in C:\Program Files\Java\jre1.8.0_60\bin\server\ from your personal PC into that same location on the server.

Upvotes: 1

Related Questions