The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Executing SQLPLUS in UNIX Script from JAVA anooptech UNIX for Advanced & Expert Users 0 04-16-2008 05:53 AM
Executing a unix command jacob23 UNIX for Dummies Questions & Answers 5 12-20-2006 07:36 PM
executing *.bat file on windows from Unix box via ftp command alx Shell Programming and Scripting 9 01-29-2006 03:31 PM
executing the su command from a java program. shailendrat UNIX for Dummies Questions & Answers 1 03-24-2005 09:27 AM
execute command unix with java:possible or not? mips Shell Programming and Scripting 4 05-13-2004 04:07 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-25-2003
Registered User
 

Join Date: Jun 2003
Posts: 1
Question Executing UNIX command from java on NT

Hi - I am totally new to UNIX so please bear with me...
I run a java program on Win NT server to do file ftp to UNIX server.
I log in, cd, create ftp file on UNIX and quit from my java progam - all works well.

Now I want to execute a script on UNIX.
At the UNIX 'console'/'shell' (!?) you type in:
./test
for the script to execute.
If I send the command "./test" from my java program, I get an error: "command not understood". I am in the correct directory where the "test" script is; and commands like "user xxxx" and "pass yyyy", and "cwd /home/mydir/" works fine.

Any ideas?

Tx,
CJ
Forum Sponsor
  #2  
Old 06-25-2003
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
You have connected via the ftp protocol. You can do "get" or "put". But all you can do is move files around. You cannot run remote scripts via ftp.

You need to get your java program to connect via ssh or telnet to get a shell prompt. Then you can run "./test".

And btw, "test" is not a great name. Unix has a "test" command.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0