javapropertiesenvironment-variablesdistributed-computingcompss

How to pass properties to Java when using COMPSs


I have a java application which is launched with a settings file passed as a property as follows:

java -DpropertiesFile=/path/to/properties/settings.properties -jar /path/to/jar/file.jar

I would like to know how/if I can pass this properties file when running my application with COMPSs framework.

Thanks


Solution

  • Currently the only option is to set the environment variable _JAVA_OPTIONS. This is variable is read once the JVM is started.

    In your example it would be:

    export _JAVA_OPTIONS=-DpropertiesFile=/path/to/properties/settings.properties
    

    NB: I used export as an example, use whatever command your system has to set environment variables.