Groovy using variable in import command -


there same question python language on web-site, need same thing in groovy:

env = system.getenv("instance") cp = ${env} + ".vars" import "${cp}" 

this of course doesn't work, there possibility use variable inside import command in groovy? i'm novice in groovy , can't figure out, googled lot, without success. grateful helps.

no can not import via string. can load class there via class.forname(cp) (then use e.g. via newinstance().


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -