Posted By:
Guna_Seelan
Posted On:
Wednesday, April 4, 2001 12:27 AM
hi to all , i installed jdk in the solaris. i've written one shell script and one java pgm. while i'm executing the java class file i would like to invoke the shell scirpt available in the same directory. but its not possible to get the output. if i run the same pgm in NT i can easily call any exe file like notepad.exe , calc.exe etc. In solaris not out put. if anyone got the query feel free to answer. /* The Codings r */ /* fscprt */ echo " hi this is the first scipt in solaris " /* ******** */ /* Java Codings r */ public class ExecScrpt { public static void main(String args[]) { Runtime r = Runtime.getRuntime(); Process p = nul
More>>
hi to all ,
i installed jdk in the solaris. i've written one shell script and one java pgm. while i'm executing the java class file i would like to invoke the shell scirpt available in the same directory. but its not possible to get the output.
if i run the same pgm in NT i can easily call any exe file like notepad.exe , calc.exe etc. In solaris not out put. if anyone got the query feel free to answer.
/* The Codings r */
/* fscprt */
echo " hi this is the first scipt in solaris "
/* ******** */
/* Java Codings r */
public class ExecScrpt
{
public static void main(String args[])
{
Runtime r = Runtime.getRuntime();
Process p = null;
try
{
p =r.exec("fscrpt");
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
/*************************************/
if u try to run the above no output.
but In NT if put
r.exec("notepad")
instead of
r.exec("fscprt")
it will open a new notepad ie that exe file will easily be called.
note :
i gave executable permission for that script called fscrpt also.
do reply if u got it.
bye ,
Guna.
<<Less