launching an application from win2000 on another a Linux machine with java
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, May 11, 2001 06:35 AM

I am trying from a java class executed in win2000 to launch an application on another Linux machine in the same local network. The same "Runtime.getRuntime().exec("....")" command I use to attempt this action works if the class is executed locally on the Linux machine but not at distance. This is how I try it and I receive an error: (error=67): Runtime rt = Runtime.getRuntime(); String[] callAndArgs = {"//server/process","args for process"}; try { Process child = rt.exec(callAndArgs); child.waitFor(); } catch(Exception e) { }    More>>

I am trying from a java class executed in win2000 to launch an application on another Linux machine
in the same local network. The same "Runtime.getRuntime().exec("....")" command I use to attempt this action
works if the class is executed locally on the Linux machine but not at distance.

This is how I try it and I receive an error: (error=67):

Runtime rt = Runtime.getRuntime();
String[] callAndArgs = {"//server/process","args for process"};
try
{
Process child = rt.exec(callAndArgs);
child.waitFor();
}
catch(Exception e)
{
}

   <<Less

Re: launching an application from win2000 on another a Linux machine with java

Posted By:   Nathan_Meyers  
Posted On:   Monday, May 14, 2001 07:46 AM

The Runtime.exec() call executes
a command locally, just as if you had typed
it into a shell. It has no capability to launch
processes on remote machines.

There are many ways to build applications
that use distributed processing - Web servers,
application servers, remote-shell protocols
like rsh and ssh - but those all involve
setting up something on the server and
executing the appropriate protocols on
the client. Using Runtime.exec()
in the way described here will not get you there.

About | Sitemap | Contact