Configure OpenJFX 11 to extract its DLLs into a different user-specified directory?












4















Is there a way to configure OpenJFX 11 to extract their DLLs into a different user-specified directory?



While trying to migrate an existing Java 10/Maven project to Java 11, I tried using OpenJDK 11. To get the code build working, I needed to add the JavaFX JARs into the Maven pom.xml configuration files (because JavaFX is no longer a built-in part of Java 11).



However, at runtime I discovered errors due to OpenJFX extracting DLL files into a user directory and then having access failures (see errors, below). I've had many projects over the years that had errors when working with the C:Users* directories (from Microsoft Windows interfering with file locks and directory permissions, anti-virus scans, etc), so I try to avoid those directories whenever possible. The Java project works properly under Java 10 on Windows 7 and on RedHat 7, which seems to imply that the Oracle's JavaFX 10 JARs are not extracting DLLs into the C:Users* directories. OpenJFX seems to have no troubles writing the DLLs into those directories, but it cannot read those same files afterwards.



I am running on Microsoft Windows 7 Professional 64-bit with service-pack 1. I haven't tried running on Linux yet with OpenJDK 11 and OpenJFX, but I would imagine OpenJFX would try to extract its DLLs on that platform as well.



Example runtime Java errors caused by OpenJFX:



Loading library prism_d3d from resource failed: java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_d3d.dll: Access is denied

java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_d3d.dll: Access is denied

Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_sw.dll: Access is denied

java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_sw.dll: Access is denied

Graphics Device initialization failed for : d3d, sw

Error initializing QuantumRenderer: no suitable pipeline found

java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found









share|improve this question


















  • 3





    You can find here the native lib loader class. There are four different ways to load the native libraries, being the one that uses cache into the user's folder the last one. Maybe you can try (manually) setting the native libraries to a different folder and use -Djava.library.path? Also you can enable javafx.verbose to true.

    – José Pereda
    Nov 19 '18 at 23:18













  • I appreciate your suggestions so far, but no success yet. I've added -Djavafx.verbose=true into my runtime java command, and I see a huge list of Microsoft Windows kernel DLLs not being found but then the system announced they were successfully loaded. Here is one example: WARNING: java.lang.UnsatisfiedLinkError: Can't load library: D:codeMyProjectDirbinapi-ms-win-core-console-l1-1-0.dll System.loadLibrary(api-ms-win-core-console-l1-1-0) succeeded

    – navySV
    Nov 20 '18 at 21:35











  • I studied the weblink you provided. The NativeLibLoader.java class appears to be trying to locate the DLLs based on the JAR file's location (and some of the code comments mention things like "// Location of native libraries relative to jar file"). However, the runtime behavior doesn't seem to agree with that, because OpenJFX is extracting the DLLs from the JARs into C:UsersMyUserName.openjfxcache11, and there are no prism*.JAR files anywhere within C:UsersMyUserName.

    – navySV
    Nov 20 '18 at 21:36











  • It must be using some other behavior to decide where to extract the DLLs into, because they are in a completely different location than the JARs they came out of.

    – navySV
    Nov 20 '18 at 21:36











  • I already have -Djava.library.path=libs (which is a local directory containing project JARs) but OpenJFX is not using that parameter for its DLL extraction. I would love to be able to "(manually) setting the native libraries to a different folder" but I have no idea how to get OpenJFX to do that.

    – navySV
    Nov 20 '18 at 21:36
















4















Is there a way to configure OpenJFX 11 to extract their DLLs into a different user-specified directory?



While trying to migrate an existing Java 10/Maven project to Java 11, I tried using OpenJDK 11. To get the code build working, I needed to add the JavaFX JARs into the Maven pom.xml configuration files (because JavaFX is no longer a built-in part of Java 11).



However, at runtime I discovered errors due to OpenJFX extracting DLL files into a user directory and then having access failures (see errors, below). I've had many projects over the years that had errors when working with the C:Users* directories (from Microsoft Windows interfering with file locks and directory permissions, anti-virus scans, etc), so I try to avoid those directories whenever possible. The Java project works properly under Java 10 on Windows 7 and on RedHat 7, which seems to imply that the Oracle's JavaFX 10 JARs are not extracting DLLs into the C:Users* directories. OpenJFX seems to have no troubles writing the DLLs into those directories, but it cannot read those same files afterwards.



I am running on Microsoft Windows 7 Professional 64-bit with service-pack 1. I haven't tried running on Linux yet with OpenJDK 11 and OpenJFX, but I would imagine OpenJFX would try to extract its DLLs on that platform as well.



Example runtime Java errors caused by OpenJFX:



Loading library prism_d3d from resource failed: java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_d3d.dll: Access is denied

java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_d3d.dll: Access is denied

Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_sw.dll: Access is denied

java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_sw.dll: Access is denied

Graphics Device initialization failed for : d3d, sw

Error initializing QuantumRenderer: no suitable pipeline found

java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found









share|improve this question


















  • 3





    You can find here the native lib loader class. There are four different ways to load the native libraries, being the one that uses cache into the user's folder the last one. Maybe you can try (manually) setting the native libraries to a different folder and use -Djava.library.path? Also you can enable javafx.verbose to true.

    – José Pereda
    Nov 19 '18 at 23:18













  • I appreciate your suggestions so far, but no success yet. I've added -Djavafx.verbose=true into my runtime java command, and I see a huge list of Microsoft Windows kernel DLLs not being found but then the system announced they were successfully loaded. Here is one example: WARNING: java.lang.UnsatisfiedLinkError: Can't load library: D:codeMyProjectDirbinapi-ms-win-core-console-l1-1-0.dll System.loadLibrary(api-ms-win-core-console-l1-1-0) succeeded

    – navySV
    Nov 20 '18 at 21:35











  • I studied the weblink you provided. The NativeLibLoader.java class appears to be trying to locate the DLLs based on the JAR file's location (and some of the code comments mention things like "// Location of native libraries relative to jar file"). However, the runtime behavior doesn't seem to agree with that, because OpenJFX is extracting the DLLs from the JARs into C:UsersMyUserName.openjfxcache11, and there are no prism*.JAR files anywhere within C:UsersMyUserName.

    – navySV
    Nov 20 '18 at 21:36











  • It must be using some other behavior to decide where to extract the DLLs into, because they are in a completely different location than the JARs they came out of.

    – navySV
    Nov 20 '18 at 21:36











  • I already have -Djava.library.path=libs (which is a local directory containing project JARs) but OpenJFX is not using that parameter for its DLL extraction. I would love to be able to "(manually) setting the native libraries to a different folder" but I have no idea how to get OpenJFX to do that.

    – navySV
    Nov 20 '18 at 21:36














4












4








4


1






Is there a way to configure OpenJFX 11 to extract their DLLs into a different user-specified directory?



While trying to migrate an existing Java 10/Maven project to Java 11, I tried using OpenJDK 11. To get the code build working, I needed to add the JavaFX JARs into the Maven pom.xml configuration files (because JavaFX is no longer a built-in part of Java 11).



However, at runtime I discovered errors due to OpenJFX extracting DLL files into a user directory and then having access failures (see errors, below). I've had many projects over the years that had errors when working with the C:Users* directories (from Microsoft Windows interfering with file locks and directory permissions, anti-virus scans, etc), so I try to avoid those directories whenever possible. The Java project works properly under Java 10 on Windows 7 and on RedHat 7, which seems to imply that the Oracle's JavaFX 10 JARs are not extracting DLLs into the C:Users* directories. OpenJFX seems to have no troubles writing the DLLs into those directories, but it cannot read those same files afterwards.



I am running on Microsoft Windows 7 Professional 64-bit with service-pack 1. I haven't tried running on Linux yet with OpenJDK 11 and OpenJFX, but I would imagine OpenJFX would try to extract its DLLs on that platform as well.



Example runtime Java errors caused by OpenJFX:



Loading library prism_d3d from resource failed: java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_d3d.dll: Access is denied

java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_d3d.dll: Access is denied

Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_sw.dll: Access is denied

java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_sw.dll: Access is denied

Graphics Device initialization failed for : d3d, sw

Error initializing QuantumRenderer: no suitable pipeline found

java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found









share|improve this question














Is there a way to configure OpenJFX 11 to extract their DLLs into a different user-specified directory?



While trying to migrate an existing Java 10/Maven project to Java 11, I tried using OpenJDK 11. To get the code build working, I needed to add the JavaFX JARs into the Maven pom.xml configuration files (because JavaFX is no longer a built-in part of Java 11).



However, at runtime I discovered errors due to OpenJFX extracting DLL files into a user directory and then having access failures (see errors, below). I've had many projects over the years that had errors when working with the C:Users* directories (from Microsoft Windows interfering with file locks and directory permissions, anti-virus scans, etc), so I try to avoid those directories whenever possible. The Java project works properly under Java 10 on Windows 7 and on RedHat 7, which seems to imply that the Oracle's JavaFX 10 JARs are not extracting DLLs into the C:Users* directories. OpenJFX seems to have no troubles writing the DLLs into those directories, but it cannot read those same files afterwards.



I am running on Microsoft Windows 7 Professional 64-bit with service-pack 1. I haven't tried running on Linux yet with OpenJDK 11 and OpenJFX, but I would imagine OpenJFX would try to extract its DLLs on that platform as well.



Example runtime Java errors caused by OpenJFX:



Loading library prism_d3d from resource failed: java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_d3d.dll: Access is denied

java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_d3d.dll: Access is denied

Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_sw.dll: Access is denied

java.lang.UnsatisfiedLinkError: C:UsersMyUserName.openjfxcache11prism_sw.dll: Access is denied

Graphics Device initialization failed for : d3d, sw

Error initializing QuantumRenderer: no suitable pipeline found

java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found






java dll runtime java-11 openjfx






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 19 '18 at 21:21









navySVnavySV

88110




88110








  • 3





    You can find here the native lib loader class. There are four different ways to load the native libraries, being the one that uses cache into the user's folder the last one. Maybe you can try (manually) setting the native libraries to a different folder and use -Djava.library.path? Also you can enable javafx.verbose to true.

    – José Pereda
    Nov 19 '18 at 23:18













  • I appreciate your suggestions so far, but no success yet. I've added -Djavafx.verbose=true into my runtime java command, and I see a huge list of Microsoft Windows kernel DLLs not being found but then the system announced they were successfully loaded. Here is one example: WARNING: java.lang.UnsatisfiedLinkError: Can't load library: D:codeMyProjectDirbinapi-ms-win-core-console-l1-1-0.dll System.loadLibrary(api-ms-win-core-console-l1-1-0) succeeded

    – navySV
    Nov 20 '18 at 21:35











  • I studied the weblink you provided. The NativeLibLoader.java class appears to be trying to locate the DLLs based on the JAR file's location (and some of the code comments mention things like "// Location of native libraries relative to jar file"). However, the runtime behavior doesn't seem to agree with that, because OpenJFX is extracting the DLLs from the JARs into C:UsersMyUserName.openjfxcache11, and there are no prism*.JAR files anywhere within C:UsersMyUserName.

    – navySV
    Nov 20 '18 at 21:36











  • It must be using some other behavior to decide where to extract the DLLs into, because they are in a completely different location than the JARs they came out of.

    – navySV
    Nov 20 '18 at 21:36











  • I already have -Djava.library.path=libs (which is a local directory containing project JARs) but OpenJFX is not using that parameter for its DLL extraction. I would love to be able to "(manually) setting the native libraries to a different folder" but I have no idea how to get OpenJFX to do that.

    – navySV
    Nov 20 '18 at 21:36














  • 3





    You can find here the native lib loader class. There are four different ways to load the native libraries, being the one that uses cache into the user's folder the last one. Maybe you can try (manually) setting the native libraries to a different folder and use -Djava.library.path? Also you can enable javafx.verbose to true.

    – José Pereda
    Nov 19 '18 at 23:18













  • I appreciate your suggestions so far, but no success yet. I've added -Djavafx.verbose=true into my runtime java command, and I see a huge list of Microsoft Windows kernel DLLs not being found but then the system announced they were successfully loaded. Here is one example: WARNING: java.lang.UnsatisfiedLinkError: Can't load library: D:codeMyProjectDirbinapi-ms-win-core-console-l1-1-0.dll System.loadLibrary(api-ms-win-core-console-l1-1-0) succeeded

    – navySV
    Nov 20 '18 at 21:35











  • I studied the weblink you provided. The NativeLibLoader.java class appears to be trying to locate the DLLs based on the JAR file's location (and some of the code comments mention things like "// Location of native libraries relative to jar file"). However, the runtime behavior doesn't seem to agree with that, because OpenJFX is extracting the DLLs from the JARs into C:UsersMyUserName.openjfxcache11, and there are no prism*.JAR files anywhere within C:UsersMyUserName.

    – navySV
    Nov 20 '18 at 21:36











  • It must be using some other behavior to decide where to extract the DLLs into, because they are in a completely different location than the JARs they came out of.

    – navySV
    Nov 20 '18 at 21:36











  • I already have -Djava.library.path=libs (which is a local directory containing project JARs) but OpenJFX is not using that parameter for its DLL extraction. I would love to be able to "(manually) setting the native libraries to a different folder" but I have no idea how to get OpenJFX to do that.

    – navySV
    Nov 20 '18 at 21:36








3




3





You can find here the native lib loader class. There are four different ways to load the native libraries, being the one that uses cache into the user's folder the last one. Maybe you can try (manually) setting the native libraries to a different folder and use -Djava.library.path? Also you can enable javafx.verbose to true.

– José Pereda
Nov 19 '18 at 23:18







You can find here the native lib loader class. There are four different ways to load the native libraries, being the one that uses cache into the user's folder the last one. Maybe you can try (manually) setting the native libraries to a different folder and use -Djava.library.path? Also you can enable javafx.verbose to true.

– José Pereda
Nov 19 '18 at 23:18















I appreciate your suggestions so far, but no success yet. I've added -Djavafx.verbose=true into my runtime java command, and I see a huge list of Microsoft Windows kernel DLLs not being found but then the system announced they were successfully loaded. Here is one example: WARNING: java.lang.UnsatisfiedLinkError: Can't load library: D:codeMyProjectDirbinapi-ms-win-core-console-l1-1-0.dll System.loadLibrary(api-ms-win-core-console-l1-1-0) succeeded

– navySV
Nov 20 '18 at 21:35





I appreciate your suggestions so far, but no success yet. I've added -Djavafx.verbose=true into my runtime java command, and I see a huge list of Microsoft Windows kernel DLLs not being found but then the system announced they were successfully loaded. Here is one example: WARNING: java.lang.UnsatisfiedLinkError: Can't load library: D:codeMyProjectDirbinapi-ms-win-core-console-l1-1-0.dll System.loadLibrary(api-ms-win-core-console-l1-1-0) succeeded

– navySV
Nov 20 '18 at 21:35













I studied the weblink you provided. The NativeLibLoader.java class appears to be trying to locate the DLLs based on the JAR file's location (and some of the code comments mention things like "// Location of native libraries relative to jar file"). However, the runtime behavior doesn't seem to agree with that, because OpenJFX is extracting the DLLs from the JARs into C:UsersMyUserName.openjfxcache11, and there are no prism*.JAR files anywhere within C:UsersMyUserName.

– navySV
Nov 20 '18 at 21:36





I studied the weblink you provided. The NativeLibLoader.java class appears to be trying to locate the DLLs based on the JAR file's location (and some of the code comments mention things like "// Location of native libraries relative to jar file"). However, the runtime behavior doesn't seem to agree with that, because OpenJFX is extracting the DLLs from the JARs into C:UsersMyUserName.openjfxcache11, and there are no prism*.JAR files anywhere within C:UsersMyUserName.

– navySV
Nov 20 '18 at 21:36













It must be using some other behavior to decide where to extract the DLLs into, because they are in a completely different location than the JARs they came out of.

– navySV
Nov 20 '18 at 21:36





It must be using some other behavior to decide where to extract the DLLs into, because they are in a completely different location than the JARs they came out of.

– navySV
Nov 20 '18 at 21:36













I already have -Djava.library.path=libs (which is a local directory containing project JARs) but OpenJFX is not using that parameter for its DLL extraction. I would love to be able to "(manually) setting the native libraries to a different folder" but I have no idea how to get OpenJFX to do that.

– navySV
Nov 20 '18 at 21:36





I already have -Djava.library.path=libs (which is a local directory containing project JARs) but OpenJFX is not using that parameter for its DLL extraction. I would love to be able to "(manually) setting the native libraries to a different folder" but I have no idea how to get OpenJFX to do that.

– navySV
Nov 20 '18 at 21:36












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53382810%2fconfigure-openjfx-11-to-extract-its-dlls-into-a-different-user-specified-directo%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53382810%2fconfigure-openjfx-11-to-extract-its-dlls-into-a-different-user-specified-directo%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?