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

Using the System class  RSS feed

 
Rajiv Chelsea
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I have a doubt regarding the System class of Java
In a java class of a project, I saw the System class being used as follows:



I want to know where and in which file is the value of that property might be stored
in the project?

 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System properties are either set by the JVM itself, or by the user on the command line. You can do this by supplying any number of -D<name>=<value> arguments. For example, to overwrite the default user.name property you can use -Duser.name=anonymous.

Well, there is one more way to set system properties - by calling System.setProperty or System.setProperties from Java code.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!