This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes Writing batch files! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

Writing batch files!

Jaffery Rab
Ranch Hand

Joined: Jan 18, 2002
Posts: 36
Hi guys!
I have got an assignment to write one batch file that could run several java classes and pl/sql stored procedure at specific time during the day say at 2:00 PM.
I have never written any batch file before and I have no clue hw to start........anybody out there who could help me out how to get it done or any internet link........
I will apprciate if you guys help me out
Cheers,
Jaffery
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

batch files (in both windows and *nix) simply take each line of the file and send it to the command line.

So to run java programs, you'd just need to send an appropriate command to java.

eg:

java MyClass

I've never done command-line plsql, so can't help you there.

As for scheduling, once your batch file is completed, Windows has a Task Scheduler, and Unix has a crontab.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

And since this is a cross-post, I'll close it.

cross-post
 
 
subject: Writing batch files!
 
Similar Threads
run a java program via a batch file wich is called through the cgi of web server
Making changes in JNLP through batch File
Batch file!
Execute java GUI in win9x using .bat
How to create shortcut for a file using JAVA