on 2016 Jul 31 7:01 AM
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
Request clarification before answering.
Hi Dries,
those you set in Deployment Popup are java system variables and should be accessed with System.getProperty(name)
If you want to use env variables you have to set them with neo console tool (mean -> deploy WAR not from UI but with command line). See --ev argument [1]
Regards,
Anton
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
59 | |
7 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.