Page 1 of 1

[SOLVED] Configure local JVM for all users

Posted: 23 Sep 2020, 14:40
by Kezo
I'm wondering if it is possible to set up a local, manually added JVM to be used by all users of the (Windows) machine. I know it is possible to set up a system configuration by basically making a copy of your deployment.config file and use that as a system configuration file (as described in the documentation), but the deployment.config file does not contain any information about local JVM. I assume there has to be another config file containing the JVM setup information, would it be possible to use this file in a system configuration as well?

Re: Configure local JVM for all users

Posted: 25 Sep 2020, 09:19
by Stephan Classen
The information about the available JVMs is stored together with the cached JVMs.
It is possible to set the system variable "XDG_CACHE_HOME" to a folder outside of the user home directory (e.g. "c:\ows-cache").
This will force all users to use the specified folder as their cache directory. As a consequence of this they share the JVM cache and also the list of available JVMs.
But they also share the cache for the downloaded applications. This can be desired or undesired depending on your applications.

Alternatively you can set the path to the JVM cache in the settings using the key "ows.jvm.manager.cache.dir"
By doing this only the JVM cache is shared and the application cache is kept independent per user

Re: Configure local JVM for all users

Posted: 29 Sep 2020, 15:02
by Kezo
Thanks, this worked, although it does not feel like an optimal solution for me. Are there any plans to add the ability to specify a JVM via .properties file in the future?

Re: Configure local JVM for all users

Posted: 01 Oct 2020, 09:20
by Stephan Classen
Most likely no,
The reason for this is that OWS is a java launcher and as such it cannot know what the requirements of the next application to launch will be.
Fixing it to a specific JVM instance may prevent some applications from working with OWS.

Maybe you can give us the reason why you need a specific JVM instance. Chances are that we have a solution for your problem which does not require to nail down the JVM as you are doing it right now.

Re: Configure local JVM for all users

Posted: 01 Oct 2020, 15:21
by Kezo
I assume we don't really need to set a fixed JVM, we're using the Azul OpenJDK and the software we are using will only run with the JRE-FX package of Java 8. In the default settings, OWS seems to only fetch the JDK package, so we installed the other one manually and set OWS to use it. It was only after installing OWS on many systems that we noticed we had to manually configure the JVM in OWS for every new user that logged on.

I guess an alternative solution would have been to set up a custom update server in OWS that points to the correct package. But as our machines are all used for a specific task and we will probably never be running any other Java application on them, setting a fixed JVM should not be a problem for us.