473,378 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to Restart a java program by itself after exiting from JVM

I have a requirement.

when we start a java program we should get a frame where we have restart button. when we press that button the program should exit from JVM and again start execution.
Feb 19 '07 #1
2 4135
r035198x
13,262 8TB
I have a requirement.

when we start a java program we should get a frame where we have restart button. when we press that button the program should exit from JVM and again start execution.
What you should probably do here is dispose all the JFrames and just create a new instance of your program. Exiting the JVM is quite abstract in itself and you will not be able to control exactly when all the program's memory is released because that depends on the platform. Why do you specifically want the program to exit the JVM?
Feb 19 '07 #2
hirak1984
316 100+
A good approach is to just get rid of the frame,by either dispensing them(good way) or just making them invisible(may get stach overflow if restarted many times) and call the initial method again,to get a fresh frame.

We really dont have the necessary arms to manipulate JVM,forgive us...

I have a requirement.

when we start a java program we should get a frame where we have restart button. when we press that button the program should exit from JVM and again start execution.
Feb 19 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Hal Vaughan | last post by:
I have a class that is sometimes called from the command line and sometimes from another class. When the user clicks "Quit" on the panel it opens, if it is running from the command line, it...
2
by: Hal Vaughan | last post by:
My program can, when directed, check a floppy for updates, verify the MD5 sums from another source, then copy the new Java classes to its own directory tree. Once it does this, I'd like to restart...
133
by: Gaurav | last post by:
http://www.sys-con.com/story/print.cfm?storyid=45250 Any comments? Thanks Gaurav
1
by: aLvInDaHoUsE | last post by:
Hey all, help needed here. I'm trying to restart the program upon clicking on the logout button. How do I recall the main() function in the code? Thanks
5
by: scorpion53061 | last post by:
Is there a way that anyone knows to force a vb.net program to shut down and then restart itself?
6
by: Leonardo Curros | last post by:
Hello, I would like to know what's the best way to restart one service. I would like to do it from the service itself. Is this possible? I try it with ServiceController.stop()...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
10
by: preethamkumark | last post by:
- The program first creates a shared memory buffer containing an array of 20 integers. - Each slot of the buffer can have either 0 or 1, where 0 represents an empty slot, and 1 represents an...
5
by: Jay | last post by:
In a sub procedure how do I recall/restart the sub and maintain the position in a loop? Eg (this doesnt work how I need it to work)... sub Get_Language() 'code here to prompt the user to do...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.