Shell script to call multiple java commands

Hi,

I want to call multiple java commands through a .sh file. I have drafted one with my least knowledge. But its not working. Pls help. I am trying to run this from Sun Solaris (OS 5.10) server with 10g oracle database.

echo \* starting script AUTORUN
echo \* get the Monitor path
Monitorpath= /export/home1/users/test/Script/
echo \*Stopping the Monitors
curdir=`pwd`
cd $Monitorpath
$Monitorpath\java MonitorStopper -l
echo \*Starting Project
$Monitorpath\start "Project" java Project
echo \*Starting Engine
$Monitorpath\start "Engine" java Engine
echo \*Starting Monitor
$Monitorpath\start "Monitor" java Monitor
echo \*Starting Escalation
$Monitorpath\start "Escalation" java Escalation
echo \*Starting ResponseMonitor
$Monitorpath\start "Response" java ResponseMonitor

I am trying to give start so that each one opens in different window (works in DOS). Is there any other command in unix for start?

Regards,
Vivek

What do you mean by "a different window"?
Do these java processes bring up GUIs? Or are they just outputting text and you want them each to run in a different terminal?
Are you running X11? (Required if you want to open any additional windows - be it another terminal or a java GUI).
Does "/export/home1/users/test/Script/start" actually exist?

Hi,

Thanks for the reply. My requirement is that when i run the first command then some of my existing processes will get killed. Then i need to start all the processes one by one. As you have mentioned, on running the command : start "Project" java Project through DOS, a new command prompt will come and the process will run in it and the name of the window will be Project. Similarly for the other commands also. So that means i want my ouput details to be shown in a new terminal for each java command. Ys the path "/export/home1/users/test/Script" do exist and in this path only the java files resides. Request you to give suggestions.

By the looks of things, that means that there's no 'start' program in your test/Script dir, and I'm also assuming no 'java' in there either, so that'll be the simplest issue, just omit that as follows:

#!/bin/sh
echo "* starting script AUTORUN"
echo "* get the Monitor path"
Monitorpath= /export/home1/users/test/Script/
echo "*Stopping the Monitors"
curdir=`pwd`
cd $Monitorpath
java $Monitorpath\MonitorStopper -l
echo "*Starting Project"
java $Monitorpath\Project &
echo "*Starting Engine"
java $Monitorpath\Engine &
echo "*Starting Monitor"
java $Monitorpath\Monitor &
echo "*Starting Escalation"
java $Monitorpath\Escalation &
echo "*Starting ResponseMonitor"
java $Monitorpath\ResponseMonitor &

If you want the output from these to each display in a seperate window, you'll need to answer my other questions about your environment (see above), most importantly, X11 - if you aren't running that, you'll not be able to open multiple windows in that fashion.

My env details are as follows - Sun Solaris (OS 5.10) server with 10g oracle database.
I dont have any idea about X11. If this helps in opening multiple windows then what change in addition is required in the code you have given me now?