I’m developing a desktop app than manages a PostgresSQL database using Compose Multiplatform.
When I run the app with IntelliJ it works fine, but when I generate an installer with ./gradlew packageMsi
and install it on my pc, I get this error in a dialog box:
java/sql/DriverManager
This is my code:
@Composable
@Preview
fun App() {
MaterialTheme {
val connection = DriverManager
.getConnection(
"jdbc:postgresql://localhost:5432/your_database",
"postgres",
"12345")
Text(connection.isvalid(1000))
}
}
I tried just getting the available drivers and still the same error, so I’m guessing the problem is not with postgres drivers.
New contributor
za ko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.