EetieD Posted March 31, 2010 Report Share Posted March 31, 2010 For my application, I need to permanently set and get environment variables simultaneously. For my Java application, you have to start a 'Command Prompt' window first. I am using the Resource Toolkit 'setx.exe' to set environment variables, but it didn't succeed me to get the environment variables realtime, without restarting the Command Prompt. Is there a way, maybe a tool, to get the most recent environment variables, without restarting the Command Prompt?Thanks for help!EetieD. Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted March 31, 2010 Report Share Posted March 31, 2010 Welcome to the Windows Forum.You don't explain enough what you are trying to achieve, or why you need to restart Command Prompt to 'get' environment variables in a Java app. Quote Link to comment Share on other sites More sharing options...
EetieD Posted April 1, 2010 Author Report Share Posted April 1, 2010 Welcome to the Windows Forum.You don't explain enough what you are trying to achieve, or why you need to restart Command Prompt to 'get' environment variables in a Java app.I hope I can make more clear by this text:I have a Java application that sets a environment variable permanently (using setx.exe). This Java application will be started from a Command Prompt window.For monitoring of this setting in my Java application, I would like to verify this action after I set this variable. But, the new environment variables will only be reloaded when I re-open this Command Prompt window. I don't want to re-open a Command Prompt window, because that means I have to restart my Java application.So, is there a way to reload the most recent 'environment variables' in a Command Prompt window, without re-opening a Command Prompt window? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.