• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Restarting the JVM

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to restart JVM by java code?
 
Ranch Hand
Posts: 174
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sham Phadtale
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Chinna Eranna
Ranch Hand
Posts: 174
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 1170
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic