🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #219

Re: Start and stop program from command prompt

#219
From: Lori M Olson [TeamB]
Date: Fri, 13 Jan 2006 16:27
54 lines
2783 bytes
Peter POCATKO wrote:
> Hello ,
> 
> I finishing program in java and my vision is that after start Windows 2003 
> is going to start my program .
> Is working fine . I run it from bat file in startup and it looks like :
> xxx.bat
> start "MyApplication" /min java -jar MyApplication.jar start
> 
> Problem is and I working on it couple of days without any solution. That I 
> know that if low battery event
> is generated on UPS after that is run bat file on Windows 2003 , where are 
> commands for safe shutdown of
> virtual disks and operating system and I need firstly from the same bat file 
> safe shutdown MyApplication
> where is running in thread INSERTs commands and after that is starting timer 
> which can be set from 1 to 99
> minutes and during this time I would like shutdown MyApplication ... and it 
> run to round of course ..
> for example
> yyy.bat
> start "MyApplication" /min java -jar MyApplication.jar stop
> 
> Have you any idea how it can do this ? I tried something but it didn`t work 
> but I like to hear some other
> opinion.
> 
> Thanks 
> 
> 

Further to Paul's "run as a service" option, you might want to read this 
article on BDN:

http://bdn.borland.com/article/0,1410,32068,00.html

-- 

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
     http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
     http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
     http://www.visi.com/~gyles19/fom-serve/cache/1.html
Technical Details
Message-ID: <43c7d464$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!pd7cy2so!shaw.ca!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43c6dedc$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,d7d22fba91821b54
X-Google-Attributes: gidf74b3,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 13 Jan 2006 09:27:50 -0700
From: "Lori M Olson [TeamB]" <javadragon@techie.com>
User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Start and stop program from command prompt
References: <43c6dedc$1@newsgroups.borland.com>
In-Reply-To: <43c6dedc$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 142.179.182.172
Message-ID: <43c7d464$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1137169508 142.179.182.172 (13 Jan 2006 08:25:08 -0700)
Lines: 54
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!pd7cy2so!shaw.ca!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail