Skip to content

Commit 9a63ed9

Browse files
authored
Fix plugin loading in Windows (#3043)
We use `File.toURI` for more stable URI, since the previous method stopped working on Java 21 on Windows.
1 parent 5d6e556 commit 9a63ed9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eclair-node/src/main/scala/fr/acinq/eclair/Plugin.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ object Plugin extends Logging {
5858
}
5959

6060
def openJar(jar: File): Option[JarURLConnection] =
61-
Try(URI.create(s"jar:file:${jar.getCanonicalPath}!/").toURL.openConnection().asInstanceOf[JarURLConnection]) match {
61+
Try(URI.create(s"jar:${jar.toURI}!/").toURL.openConnection().asInstanceOf[JarURLConnection]) match {
6262
case Success(url) => Some(url)
6363
case Failure(t) => logger.error(s"unable to load plugin file:${jar.getAbsolutePath} ", t); None
6464
}

0 commit comments

Comments
 (0)