Forums Register Login

How to set the System variable on WINDOWS and UNIX?

+Pie Number of slices to send: Send
Are there some methods to set the system variable on Windows and UNIX?
I think it must be done by Runtime.exec(cmd). And my question is what's the cmd?
+Pie Number of slices to send: Send
And more, I want to change the system variable persistent, not just a time.
+Pie Number of slices to send: Send
help me!
How to set the system variable persistently on Windows or UNIX?
+Pie Number of slices to send: Send
If by "system variable" you mean "environment variable" the answer is that you can't, at least not portably. On UNIX you might conspire to edit the user's .profile or .cshrc or .bashrc or .tcshrc file (each of which can use a different syntax!) On Windows, you'd need a small auxilliary program or bit of native code to put the values into the registry. And then, of course, you're forgetting Macs.
Can I ask why you want to do this?
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 855 times.
Similar Threads
How to change the "user.name" system property?
ANT BUILD.xml Vs BATCH
Error compiling the AdviceClient.java
File Path handling on Button event
calling batch files
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:21:25.