RFR: 8222455: JavaFX error loading glass.dll from cache

Michael Strauß mstrauss at openjdk.java.net
Fri Oct 29 14:34:15 UTC 2021


On Tue, 26 Oct 2021 12:09:19 GMT, Marius Hanl <mhanl at openjdk.org> wrote:

> This problem can happen when using multiple instances with different jfx early access (ea) versions.
> 
> Example: 
> Instance 1 uses 18-ea+4 and Instance 2 uses 18-ea+1. 
> Instance 1 is started (and will cache and use libraries), then instance 2. 
> Now instance 2 detects via a hash comparison that the cached libraries are not the same as the supplied ones. 
> With this information instance 2 tries to delete the old libraries but fails while doing so (as instance 1 uses them currently) and will terminate right after.
> 
> The problem here is that instance 1 and 2 are using the same cache folder: **18-ea**. This is because the `NativeLibLoader` uses the `javafx.version` property for determining the folder name, which in case of an ea version will always be **18-ea** (for all ea versions starting with 18 obviously).
> 
> Fix as also mentioned in the ticket is to use the `javafx.runtime.version` property instead. 
> With this the folders will be named 18-ea+1 and 18-ea+4.

Perhaps it would also be a good idea to move these files to the user's temporary directory, so that they can be cleaned up by the system. Otherwise they probably won't be removed in most cases when the user removes the application that created them.

-------------

PR: https://git.openjdk.java.net/jfx/pull/654


More information about the openjfx-dev mailing list