- 1 year ago
How can I force 1.8.0_191 ( x86_64) just for this application (JNLP)?
To force a specific Java version (1.8.0_191, x86_64) for a Java Network Launch Protocol (JNLP) application, you can follow these steps:
Install the Desired Java Version: Download and install the Java Runtime Environment (JRE) version 1.8.0_191 (x86_64) on your system. Make sure it is installed in a location you can reference later.
Edit the JNLP File: Open the JNLP file associated with the application in a text editor.
Set Java Version in JNLP File: Locate the
<j2se>
element in the JNLP file. It specifies the required Java version for the application. Update theversion
attribute to match the desired version. For example:xml<j2se version="1.8.0_191" href="http://java.sun.com/products/autodl/j2se"/>
This setting specifies that the application should use Java version 1.8.0_191.
Save the JNLP File: Save the modified JNLP file.
Launch the Application: Run the JNLP file using Java to launch the application. You can use the
javaws
command or open the JNLP file directly from your file explorer.For example, using the
javaws
command:bashjavaws path/to/your/application.jnlp
This will launch the application using the specified Java version (1.8.0_191).
By updating the <j2se>
element in the JNLP file to specify the desired Java version, you can force the application to use that specific version. Ensure that the version you specify matches the installed Java version on your system.
Note that if the desired Java version is not installed on your system or not available in the specified location, the application may not run as expected or may display an error message.
Additionally, keep in mind that JNLP applications are subject to the security policies and restrictions imposed by the Java Runtime Environment. Make sure to adhere to the necessary security guidelines and keep your Java installation up to date with the latest patches and security fixes.