Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

is there any way to pass environment variable, not by using -D ?  RSS feed

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post
is there any other way to pass variables to java not by using -D argument?
for example i want to use proxy in my web service client and i do not want to pass proxy address using this -D arguments, is there any other way?

thanks
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16026
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get the value of an environment variable with the method System.getenv(name). See the API documentation.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!