Results 1 to 4 of 4
- 01-11-2011, 10:50 PM #1
Member
- Join Date
- Dec 2010
- Posts
- 21
- Rep Power
- 0
Connecting to linux web server and performing command line operations with Java
Hey guys,
I'm forever coping files all over the place on my Linux (CentOS 5) webserver and I'm wondering whether it's possible to fire command lines commands at the webserver to save me the hassle of logging into Putty and performing them myself.
I've looked all over for any information regarding this but I can't seem to find any. I'm just wondering if you guys/girls have any information/useful links you could point me towards.
Cheers!
- 01-11-2011, 10:59 PM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,605
- Rep Power
- 5
If the code is running locally, make a call to Runtime.exec(), if not, you will probably need some sort of script that you can access remotely that performs the operation for you (imo not very safe)
- 01-11-2011, 11:01 PM #3
Member
- Join Date
- Dec 2010
- Posts
- 21
- Rep Power
- 0
- 01-11-2011, 11:45 PM #4
Member
- Join Date
- Dec 2010
- Posts
- 21
- Rep Power
- 0
I've been searching around since making this post and I think i've finally found a solution, located at: Ganymed SSH-2 for Java
Just installed the library and it all seems very straight forward!
Similar Threads
-
"Could not find the main class" for Linux Command Line Compile
By tetelee in forum New To JavaReplies: 3Last Post: 08-25-2010, 10:21 AM -
Formatting java command line output - Multi line string
By dricco in forum New To JavaReplies: 2Last Post: 07-02-2010, 02:20 PM -
linux command to start a java web server
By lazarus in forum JavaServer Faces (JSF)Replies: 0Last Post: 06-24-2008, 03:30 PM -
calling linux command line in java
By fangzhong in forum New To JavaReplies: 0Last Post: 02-03-2008, 04:24 PM -
Unable to execute command line command in java
By LordSM in forum New To JavaReplies: 1Last Post: 08-08-2007, 12:23 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks