Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 349
Pol Alvarez Vecino Avatar asked Jun 11 '26 00:06

Pol Alvarez Vecino


1 Answers

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.

like image 56
COMP Superscalar Avatar answered Jun 16 '26 11:06

COMP Superscalar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!