Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-18-2009, 05:11 AM   #1
LQ Newbie
Registered: Jan 2009
Posts: 4

Rep: Reputation: 0
Smile how to use bash command in java?


when i run the following code, '' not started


String cmd = "bash \"/home/kulandaivelu/Desktop/works/other's works/\"";


but it started when i use same command(bash "/home/kulandaivelu/Desktop/works/other's works/") in terminal

anyone let me know what mistake i made in the code piece..

Thanks in Advance
Old 03-18-2009, 05:57 AM   #2
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
Old 03-18-2009, 08:49 AM   #3
LQ Newbie
Registered: Jan 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Hi almatic,

Thank you for reply..

first of all i am sorry for posted the wrong question in this forum

actually this question should be asked in the java forum

anyhow i got a answer for above question

i changed the code as like below. it worked well.


String cmd[] = {"bash","/home/kulandaivelu/Desktop/works other's/"};



Thanks again


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
java -version, bash: java: command not found kirman Programming 4 03-20-2008 12:13 AM
-bash: java: command not found vinbase Linux - Newbie 1 01-01-2008 06:52 PM
(Debian) bash: java: command not found pjpeter Linux - Newbie 3 09-25-2004 03:59 PM
bash: java: command not found pjpeter Programming 4 09-24-2004 04:02 PM
java command - "bash: java: command not found" ??? RedHat123 Programming 2 07-17-2002 12:09 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration