• Post Reply Bookmark Topic Watch Topic
  • New Topic

System properties  RSS feed

 
Nelo Angelo
Ranch Hand
Posts: 44
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I was trying out this code which prints current system properties. Is there any method to create a new System properties value?

The code that prints current system properties are as follows:



Please advise.
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nelo Angelo wrote:Please advise.

There are two 'setProperty/ies()' methods in the System class, but you should look at the API because there are caveats.

Having never used them, I'm also not sure if they set the value(s) permanently, or just for the current session; I'm sure somebody else will know though, or you can probably find the answer in the tutorials.

Winston
 
Nelo Angelo
Ranch Hand
Posts: 44
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston Gutkowski wrote:
I'm also not sure if they set the value(s) permanently, or just for the current session


Hey man, thanks for the reply. I checked out the API and played around with it. It isn't permanent and exists only for the running process. Is there any way to make the changes permanent?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!