Pregunta

I have a eclipse project which connects to different environments based on VM parameters passed in launch configuration. In order to achieve this i have set env. variables in "launch configuration -> environment" and then tried to pass them as VM argument but i get an error as eclipse is not able to resolve those env. variable.

Any guidance on how to achieve this?

¿Fue útil?

Solución

Just below "VM arguments" window there is button called "Variables". Eclipse VM args

When you click on variables it will give you an option to create new variable which can then be used in vm args as "${new_var}".

So probably we can't use env. variables as VM args in eclipse but this is a way out.

Otros consejos

I found the same. it seems that after added, it couldn't be removed? but I can edit it to avoid error: new_var=-Dabc=xyz

Just use ${env_var:yourenvvar} in the VM parameter field.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top