11/*
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.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * 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
235235 private static String cacheLibrary (InputStream is , String name , Class caller ) throws IOException {
236236 String jfxVersion = System .getProperty ("javafx.runtime.version" , "versionless" );
237237 String userCache = System .getProperty ("javafx.cachedir" , "" );
238+ String arch = System .getProperty ("os.arch" );
238239 if (userCache .isEmpty ()) {
239- userCache = System .getProperty ("user.home" ) + "/.openjfx/cache/" + jfxVersion ;
240+ userCache = System .getProperty ("user.home" ) + "/.openjfx/cache/" + jfxVersion + "/" + arch ;
240241 }
241242 File cacheDir = new File (userCache );
242243 boolean cacheDirOk = true ;
@@ -257,7 +258,8 @@ private static String cacheLibrary(InputStream is, String name, Class caller) th
257258 }
258259 if (!cacheDirOk ) {
259260 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 ;
261263 cacheDir = new File (tmpCache );
262264 if (cacheDir .exists ()) {
263265 if (!cacheDir .isDirectory ()) {
0 commit comments