🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Start and stop program from command prompt

#218
From: Paul Nichols [TeamB]
Date: Sat, 14 Jan 2006 06:37
38 lines
2088 bytes
Peter POCATKO wrote:

>
> 
> 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.
> 
I do not know of any way you can do this from a batch file per se. The only
thing I can see is:

(1) You will need to configure Windows 2003 to stop this app from running.
You would have to set this up in :
        The registry
        As a Windows service
        Put a COM wrapper around the batch file using Windows notification
        API
        Perhaps use JNI to write a C Routine to shut this down, again using Windows
        Notification API.
        

If you were using Unix/Linux/Mac, you could probably do this from a shell
script. But without a full shell scripting language that has access to the
kernel APIs, I do not know how you could do this other than the methods I
described above,

Just remember, when you are wanting to use native OS operations, you have to
do some low level API work (unless, as stated you are using Unix or a Unix
derivative, where shell scripts give you additional power). Even on Unix,
you will invariably have to go outside Java or use JNI to call services or
Kernel/GDI apis direct.

Hope this helps!




         
Technical Details
Message-ID: <43c745e0@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!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
Message-ID: <43c745e0@newsgroups.borland.com>
From: "Paul Nichols [TeamB]" <paul@comp.net>
Subject: Re: Start and stop program from command prompt
Newsgroups: borland.public.jbuilder.java.language
Date: Sat, 14 Jan 2006 00:37:31 -0600
References: <43c6dedc$1@newsgroups.borland.com>
Lines: 38
User-Agent: KNode/0.9.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
NNTP-Posting-Host: 68.186.204.152
X-Trace: newsgroups.borland.com 1137133025 68.186.204.152 (12 Jan 2006 22:17:05 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail