The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to invoke a perl script from java program grajesh_955 Shell Programming and Scripting 4 02-21-2008 10:42 AM
Invoke perl program from Ksh mahalakshmi Shell Programming and Scripting 10 12-19-2006 08:46 AM
invoke same script twice mpang_ Shell Programming and Scripting 2 04-05-2006 06:14 AM
how to invoke shell script gopa_mani Shell Programming and Scripting 1 12-30-2005 11:43 PM
Invoke java program in different processc d liux99 UNIX for Advanced & Expert Users 1 08-18-2005 12:47 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-27-2006
mpang_ mpang_ is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 89
Invoke java program in script

Hey all,

My boss tasked me with the job to write a script which would invoke various java programs, the thing is I don't know much about shell scripting so would you experts help me out?

Here is the requirement
- 2 applications written in java: App_A and App_B
- App_A will accept a set of parameters and different action will be
taken depending on the paramters
i.e) ./java App_A Apple and ./java App_A Orange => different results
- App_A can be ran simultaneously with different parameters
i.e) ./java App_A Apple and ./java App_A Orange => run at same time
- App_B must be executed after all instances of App_A are finished

App_A required an input file which would be ftp to our server, so App_A is given a timeframe of one hour to check if the file exists before continue to invoke the program. If within the given timeframe, no file arrived then that instance of App_A would not be invoked.

What I need to do is to write a shell script which would invoke 3 instances of App_A, at least one instance of App_A need to be invoked in order for App_B to be called.

So here is the conclusion
1) all 3 instances of App_A are invoked (files found), so App_B is then called
2) all 3 instances of App_A are not invoked (waited for an hour and still no file found), so App_B won't be invoked instead an error is writen to log file
3) at least 1 instances of App_A is called, App_B is then invoked also an error message is logged.

I hope I explain myself clearly and please all you experts shine some light on me. Thanks! Sample codes would be GREATLY appreciated!!!!
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0