cancel
Showing results for 
Search instead for 
Did you mean: 

Environment variables for Java Applications through Cloud Cockpit

dhorions
Contributor
0 Kudos
904

Hello,

when setting environment Variables as JVM parameters in the Cloud Cockpit, it seems impossible to use these in java application deployed on the tomcat runtime.

Java Code :

logger.info("Environment Variable ENVVAR1 = " + System.getenv("ENVVAR1"));

Log Ouput :

Is there another way to set environment variables, or is there a better way to pass parameters to a java application on hcp?

Thank You,

Dries

View Entire Topic
ChrisPaine
SAP Mentor
SAP Mentor
0 Kudos

Hi,

I have used custom properties on a destination and used the destination api to read them. Works well and easy to view what has been set.

Cheers,

Chris

dhorions
Contributor
0 Kudos

Thanks, that's a very good solution if the parameter is relevant for one specific connection.