1
1
/*
2
- * Copyright (c) 2010, 2021 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2010, 2022 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -235,8 +235,9 @@ private static boolean installLibraryFromResource(String libraryName, List<Strin
235
235
private static String cacheLibrary (InputStream is , String name , Class caller ) throws IOException {
236
236
String jfxVersion = System .getProperty ("javafx.runtime.version" , "versionless" );
237
237
String userCache = System .getProperty ("javafx.cachedir" , "" );
238
+ String arch = System .getProperty ("os.arch" );
238
239
if (userCache .isEmpty ()) {
239
- userCache = System .getProperty ("user.home" ) + "/.openjfx/cache/" + jfxVersion ;
240
+ userCache = System .getProperty ("user.home" ) + "/.openjfx/cache/" + jfxVersion + "/" + arch ;
240
241
}
241
242
File cacheDir = new File (userCache );
242
243
boolean cacheDirOk = true ;
@@ -257,7 +258,8 @@ private static String cacheLibrary(InputStream is, String name, Class caller) th
257
258
}
258
259
if (!cacheDirOk ) {
259
260
String username = System .getProperty ("user.name" , "anonymous" );
260
- String tmpCache = System .getProperty ("java.io.tmpdir" ) + "/.openjfx_" + username + "/cache/" + jfxVersion ;
261
+ String tmpCache = System .getProperty ("java.io.tmpdir" ) + "/.openjfx_" + username
262
+ + "/cache/" + jfxVersion + "/" + arch ;
261
263
cacheDir = new File (tmpCache );
262
264
if (cacheDir .exists ()) {
263
265
if (!cacheDir .isDirectory ()) {
0 commit comments