Can't run a java command on linux box connected by ssh

Lonni J Friedman netllama at gmail.com
Tue Nov 25 08:40:23 PST 2008


On Fri, Nov 21, 2008 at 1:21 AM, Joglekar <kedarmj at gmail.com> wrote:
>
> Hi All,
>
> Here is what i am trying to do:
>
> I have a linux box to which i want to connect to and run a java application
> there.
> To connect to the linux box, i am using the 'ssh'.
>
> I am sitting on a linux box and i am 'ssh'ing into another linux box, on the
> one i am trying to connect, i have already compiled the application, and it
> runs well on that box when tested directly.
>
> USER at server1$ ssh USER at SERVER2 . runap
>
> the runap is a shell script and it runs a java command.
>
> If i log into SERVER2 directly and run this scripts, it runs fine, however
> when i am trying to get into SERVER2 and then run the script, it fails. It
> gives the following error:
>
> java: command not found
>
> can someone tell me what is it that i am missing?

You don't have 'java' in your $PATH, and apparently runap isn't
setting a sane $PATH.


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                                    netllama at gmail.com
LlamaLand                       https://netllama.linux-sxs.org



More information about the Linux-users mailing list