Solved

run multiple java applications

Posted on 2006-10-31
12
267 Views
Last Modified: 2012-06-21
I have to create a scheduled task in which i have to run  4 separate applications -

1. java -jar cleaner.exe  --- cleans a file
2. sqlldr  --to load clean data
3. java -jar regulator.exe ---- compares new data with old data
4. java -jar findposition.exe - finds position for each record.

I want these application to run one after other. So sqlldr should not run until cleaner has finished cleaning and so on...

Now if I create a single batch file to run all the above applications, will all of these run in a sequence?
0
Comment
Question by:at999
12 Comments
 
LVL 24

Expert Comment

by:sciuriware
Comment Utility
Yes, in an ordinary .bat they will run sequentially.


Another approach may be:

1) run them from another JAVA program
2) join them and call their 'main()'-s from another class

Everything is good.

;JOOP!
0
 
LVL 92

Assisted Solution

by:objects
objects earned 50 total points
Comment Utility
> Now if I create a single batch file to run all the above applications, will all of these run in a sequence?

depends on the application, and whether it completes processing before exitting.
0
 
LVL 24

Expert Comment

by:sciuriware
Comment Utility
>>> I want these application to run one after other
Let's assume that or it will be very complex.

;JOOP!
0
 
LVL 4

Assisted Solution

by:TheMajestic
TheMajestic earned 50 total points
Comment Utility
hi,

as mebtioned earlier in ordinary batch file it will run sequentially but there r prob .

so the best way i to use ant. in ant u can specify a dependency for a job to excute.that is for example the sqlldr will run only after the succesfull excution of its dependency job lets say cleaner.exe.

i think ant bulider is a best way to run this process.
0
 

Assisted Solution

by:DaBump
DaBump earned 50 total points
Comment Utility
Look at the java open source scheduling technology called Quartz:

http://www.java-source.net/open-source/job-schedulers/quartz

Good luck...
0
 
LVL 24

Accepted Solution

by:
sciuriware earned 100 total points
Comment Utility
Off topic!
the question was: Now if I create a single batch file to run all the above applications, will all of these run in a sequence?

And the answer is YES.

;JOOP!
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:at999
Comment Utility
like if i type in a batch file -
notepad.exe
notepad.exe
notepad.exe

And if I run this batch file,
It wont open the next notepad until the previous one is closed!!!

Would the same thing happen with java.exe and sqlldr.exe???

0
 
LVL 24

Expert Comment

by:sciuriware
Comment Utility
Yes.
0
 

Author Comment

by:at999
Comment Utility
Does it depend on operating system?? - XP, NT Server etc?
0
 
LVL 24

Expert Comment

by:sciuriware
Comment Utility
No
0
 
LVL 24

Expert Comment

by:sciuriware
Comment Utility
The word 'batch' refers to a sequence, so it's the same everywhere
and has been over 50 years.

;JOOP!
0
 

Author Comment

by:at999
Comment Utility
many thanks...:)
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This video teaches viewers about errors in exception handling.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now