473,322 Members | 1,431 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,322 software developers and data experts.

stop command (I need help)

6
Hi every body

I am new in the forum and in JAVA language. I have a program in Java and I need to add a statement that stop runing the program without exiting the form or the window. please help me.

regards
Nov 7 '06 #1
4 7670
r035198x
13,262 8TB
Hi every body

I am new in the forum and in JAVA language. I have a program in Java and I need to add a statement that stop runing the program without exiting the form or the window. please help me.

regards
Post your code (using code tags) and explain when you want the program to stop.
Nov 7 '06 #2
horace1
1,510 Expert 1GB
you can delay for a peroid of time, e.g.
(1) The method sleep() is defined in the class Thread, sleep(1000) puts thread aside for exactly one second.
(2) The method wait() is defined in the class Object, wait(1000) causes a wait of up to one second; a thread could stop waiting earlier if it receives the notify() or notifyAll() call.

or you could use a 'forever' loop
while(true);

you would then have to kill the process
Nov 7 '06 #3
If your problem is exiting the progrm
I think you can use System.exit(0);
Nov 7 '06 #4
yeah but he doesn't want the window to close, he just wants to stop all processes
Nov 8 '06 #5

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

Similar topics

0
by: lawrence | last post by:
Dear Peter, Do we know anyone else who writes PHP code? There is too much work to do, especially if Costin and I are going to join our software together. The easiest way for us to join our...
4
by: Marcia Hon | last post by:
Hi, I am trying to run a program except I get the following segmentation fault. I don't know how to solve it. Please if you know could you please help. Thanks, Marcia Program received...
4
by: DKode | last post by:
Hello, I have been using VB.NET for about 5 months and now I decided it's time to start using C#.NET because I like the syntax setup alot more, because it more closely resembles php/perl which...
2
by: ern | last post by:
My command-line application must be able to run text scripts (macros). The scripts have commands, comments, and flags. Comments are ignored (maybe they are any line beginning with " ; ") Commands...
1
by: AlexZh | last post by:
Hi, I'd like to stop command line build by one project build failed. To do that I've created simple AddIn (see code below), that works fine for IDE and does not work for command line. In the AddIn...
14
by: ra7l | last post by:
hi all bleas h need help in cods GUI and Thread i need help function start () run() white () join () sleep ()
5
sweetzhay
by: sweetzhay | last post by:
this code i will have an output of 1 12 123 1234 12345 when pressing command 1 Private Sub Command1_Click() Label1.Caption = Clear
2
by: manjuks | last post by:
Hi All, I need help to port below command to LINUX, it was written for Solaris platform $cmd = "/usr/sbin/route -n add -host $hoc -gateway $gatewayIp -setsrc $vcip"; In Linux route command...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.