Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-30-2011, 10:52 AM   #1
Registered: Mar 2011
Location: Northeast USA
Distribution: Debian Squeeze
Posts: 47

Rep: Reputation: 1
Java with bash script in command path

I am working with the Sphinx4 AVR/IVR recognizer written entirely in Java. In a command and control demo, called "Dialog Demo" we have to create our own command scripts so the program actually does something. Here is their commentary:
When the program runs, you will be presented with a menu of commands that can be spoken. Here is a sample run. The spoken commands are highlighed in green. Note that this is just a demonstration of the speech technology. This demo will not actually perform the command. Thus, when you say "play games / play adventure " no game will actually played, similarly, when you say "make a phone call / call paul" no phone call will be made.

Note - when browsing newspapers from the 'news' menu, this demo will actually attempt to open the news page in your web browser by executing the command 'browse web-page-url'. If you want to enable this feature place a browse script in your command path. The script I use with the firefox browser is this:

export FF_HOME="/usr/share/firefox

if [ "x$url" = "x" ]; then

  if $FF_HOME/mozilla-xremote-client openURL\("$url"\); then
    exit 0
    exec $FF_HOME/firefox "$url"
If you surmised I am a newb to programming you are correct. I know how to write a bash script, but I have no idea how this implementation works, where this script should go, what "command path" actually means, etc. I see that Java calls for "system" but I have no handle on that. I am still at "Hello World" with Java.

And how does one find the commands to start and manipulate various programs and utilities--easily? I come across them in tutorials or Google to find them, but I have not seen any systematic way of locating them.

I am just asking for pointers since I really need to learn all this myself.

Any help is much appreciated.
Old 09-30-2011, 11:25 AM   #2
Registered: May 2001
Posts: 29,358
Blog Entries: 55

Rep: Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545
function help() { echo "Bash scripting guides:"; }


bash scripting, commands, control, java

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
[SOLVED] Command path is in PATH but bash does not find the command. stf92 Linux - Newbie 17 03-23-2012 04:19 AM
[SOLVED] bash: how to know in the script the path to itself? netimen Linux - General 6 10-14-2009 01:19 AM
bash script path issue - how to pass a path as a string to a variable PiNPOiNT Programming 5 04-17-2009 05:48 PM
java -version, bash: java: command not found kirman Programming 4 03-19-2008 11:13 PM
java path in bash matador Mandriva 2 12-03-2003 08:51 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:06 PM.

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