sabre150 wrote:So creating a small java application that simply System.outs the system properties that exist at that point in time would be an answer to this dubious question I guess :/797836 wrote:I don't understand this. The Java system parameters only exist within a running Java program and can be set on the command line that executes the program.
Yes, I am talking about the system properties. How we can get that through command line.
gimbal2 wrote:I suppose so. That might be a reasonable guess at what it means to "get (something) through the command line" but of course the OP is free to provide an English translation at any time. Anyway here's the code I use to do that:
So creating a small java application that simply System.outs the system properties that exist at that point in time would be an answer to this dubious question I guess :/
Apologies for the verbosity, I know it could be reduced to 1 line of code, but I just cut it and pasted it from a larger piece of code.
Properties sys = System.getProperties(); sys.list(System.out);
doubled the amount of code!If the code size is measured in the number of lines. More subtle size measurements are also conceivable.
BIJ001 wrote:Yeah I knew that one was coming the moment I hit submit ;)doubled the amount of code!If the code size is measured in the number of lines.
His measured output was negative...So he was canned? The manager saw the light? Hell froze over? Don't end on a cliffhanger, if you tell a story then provide the juicy bits too! :)
BIJ001 wrote:Yes, I know that. I was answering one possible English translation of the OP's question. It would be possible to ask a clear question which specified whether all of the system properties were required, or only the ones specified on the command line, but miraculously the OP still hasn't done that.
However the System properties include besides the ones set in the command line also the preset, predefined ones like file.separator, user.dir, user.home, user.name etc.