Do JavaFX app users now need to separately install Microsoft Visual C++ Redistributable? #365
Comments
There is nothing that an application needs to do. The Microsoft redistributable DLLs are included in JDK 11. They were removed from the JavaFX to avoid a duplicate file error. |
@kevinrushforth When I attempted to run a jlink'd javafx app on Windows 10, it didn't work until I installed the Microsoft Visual C++ Redistributable. As soon as I installed the Redistributable, it worked fine. What could I have done wrong? This is the jlink line: IIRC, the error was to do with not being able to find prism. |
That should have worked as long as you used JDK 11. Were you using JDK 10 or JDK 11? |
@kevinrushforth These are the exact dependencies: https://github.com/knaccc/i2p-zero/blob/master/bin/java-config.sh So it's latest AdoptOpenJDK 11.0.1 and Gluon openjfx-11.0.2. (The JavaFX project that has this problem is here: https://github.com/knaccc/i2p-zero) |
Btw it's this exact error that I have: Graphics Device initialization failed for : d3d, sw |
The javac and jlink lines are here: https://github.com/knaccc/i2p-zero/blob/master/bin/build-launcher.sh |
Can you provide the output running it with:
I'll reopen this for now. |
Also, can provide a list of DLLs in the |
Thanks for your help, @kevinrushforth I've just run this on a ModernIE Win10 VM with hardly any other software installed. Here are the DLLs:
Here is the verbose output:
|
Btw I noticed that Windows does have api-ms-win-core-console-l1-1-0.dll in the C:\Windows\System32\downlevel dir. Therefore I fixed some of the errors by adding: However, it then fails when looking for api-ms-win-crt-conio-l1-1-0.dll, which I don't appear to have in my Windows installation. The new verbose output is:
|
That's the problem. There are no MS DLLs. So either there is a bug in jlink or you are pointing to jmods for java.base that don't include them. |
One more question. Your jlink command is:
Can you check the java.base.jmod in ${JAVA_HOME_VARIANT}/jmods and verify that it is from JDK 11.x and contains the Microsoft DLLs? |
Aha, ok I think you've solved it. I've just downloaded OpenJDK11 from https://jdk.java.net/11/ and compared the DLLs to AdoptOpenJDK 11. Looks like AdoptOpenJDK was the problem. Sorry to have bothered you with this. Do you happen to know what the licenses are on these DLLs? Because of e.g. strong crypto export rules, we were advised to use the AdoptOpenJDK instead of the jdk.java.net server. From AdoptOpenJDK 11:
|
OK, I'll close this.
You would need to check with Microsoft. |
Please could you clarify: Given this change, does this mean that in the future, JavaFX app developers will need to instruct their users to separately download and install the Microsoft Visual C++ Redistributable?
Or, is there a way to bundle the DLLs with a jlink'd javafx app so the user does not need to do anything?
The text was updated successfully, but these errors were encountered: