This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Java cannot restart itself. Why do you want to do that ?
You may want to wrap the jvm in some script like shell script in unix.
Joined: Jul 29, 2008
I am using Swing client and JBoss server. I want to reset password and then restart the client.
After password reset if I use System.exit() and restart the client manually(double click on exe.)application works with new credentials. I get desired information from server.
But when I reset password and then open the login window programatically(that is in code after resetting password without using System.exit()) I am not able to get access of server. Client still uses old credentials which are invalid and so resulting in server error saying - User Invalid.
I just want that after password reset user should get Login page automatically without double click on exe.
Sham Phadtale wrote:Client still uses old credentials which are invalid and so resulting in server error saying - User Invalid.
Assuming your client is completely in Java, Why will it use old credentials ? Probably some cache is not being updated.
I believe, you should fix this problem, rather looking for restarting the application.
Even if you could pull that off, it would still be in the credentials of the original starter. If you are trying to change credentials, you need to get something to start up that does not already have credentials associated with it. Your going to need the OS to do this for you. Probably a script.