Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2006

Tip: Looking for answers? Try searching our database.

Manipulating the Windows Environment from Java

Thread view: 
Gilbert Ostlethwaite - 06 Dec 2006 15:26 GMT
Hi

I have a third party java application that talks to a back end ERP
system through a C program (also third party & no source) that runs in
a Windows command window (it won't run as a Windows service). This
gateway is prone to falling over and the third party java app provides
a number of methods to interrogate the status of the C-program. At the
moment I have my own "heartbeat" program that calls these methods every
minute or so and fires off e-mails if it finds a problem.

Recently, the C-program has taken to falling over in the small wee
hours & I'm fed up with being woken up at dark o'clock several times a
week.

Is there a Java library available that will manipulate the windows
environment in such a way as to  allow me to
a) Find the command window that the C-program is running in.
b) Close the program and command window (in effect issue Ctrl-C to the
window)
c) Open a new command window
d) Send the neccassary command string to the window that will restart
the program.

Regards
Roger
Oliver Wong - 06 Dec 2006 16:13 GMT
> Hi
>
[quoted text clipped - 18 lines]
> d) Send the neccassary command string to the window that will restart
> the program.

   I don't think so. What you could do instead is have the Java program
itself run the C-program, and see if it can monitor that program in any way,
and if it detects that the program has failed, to re-run it. If the main
reason the command window was necessary was to see any output the C-program
might produce, you could write a simple GUI which just reads output from the
C program, and displays it in a text box.

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.