Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Running Java program from script shell using SSH

807601Apr 2 2008 — edited Apr 2 2008
Hello!

I have this problem: I need to run a java command like: java Prog arg1 arg2 arg3 on i machines, using a shell script.

First of all, I'm trying to make it work for a single machine. But the problem is when I write the line << ssh user@localhost "java -classpath /a/b/ Prog arg1 arg2 arg3" >> and run the script, it is not able to execute the entire line. Is there a special options for the arguments of my Prog class? I want to mention that between my arguments there is another text file which is read by the Prog and when i run the script says it cannot find that file; Please any ideas for not remain stuck here?

Thank You in advance!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 30 2008
Added on Apr 2 2008
4 comments
531 views