I would like to access an SQLite database from within a Java Ghidra script. However, if I include the line import java.sql.*; in the script, Ghidra gives the error > Unable to locate script class:. If I understand correctly, only certain Java libraries are available within Ghidra, so is there an SQL library available?

1 Answer 1


It doesn't look like Ghidra ships with any kind of SQLite library by default, but since Ghidra (I think) 9.2 you can import OSGI compatible .jar files in your scripts. Supposedly the official SQLite Jar is OSGI compatible already.

The details are explained in the Ghidra Help documents, so for the pretty HTML view: F1 in Ghidra, Ghidra Functionality, Scripting, Ghidra Bundlesenter image description here

or read the document on some mirror like https://fossies.org/linux/ghidra/Ghidra/Features/Base/src/main/help/help/topics/BundleManager/BundleManager.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.