LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-05-2009, 04:09 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Rep: Reputation: 33
Can not start an executable file


I have an executable file called jboss in the current directory:

-rwxr-xr-x 1 test jboss 7151 Aug 5 11:04 jboss

An in the file jboss it looks as follow:

Code:
...
#---------------------------
# command handling
#---------------------------

case "$1" in

start)

        if [ -n "`ps -fu $JBOSSUSER | grep -v grep | grep java |grep -v Agent | grep $CONTEXT`" ]
        then
		echo "Java/JBoss is already running - no action taken"
	else
		$ISDIR/$MYNAME cleanup
		echo "starting: Jboss"
		echo "check log file for completion!!"
		# check that we are the jboss user or set su for usage
		ME=`whoami`
		if [ "$ME" = "$JBOSSUSER" ]; then
			$CMD_START >$JBOSS_CONSOLE 2>&1 &
			#echo "$CMD_START >$JBOSS_CONSOLE 2>&1 "
		else
			$CMD_START >$JBOSS_CONSOLE 2>&1 &
			#echo" $SUBIT "$CMD_START" >$JBOSS_CONSOLE 2>&1 "
			 #$SUBIT $CMD_START >$JBOSS_CONSOLE 2>&1 
		fi
	fi
	;;
...
When I call this executable file with jboss start, I got error as follow:

-bash: jboss: command not found

Someone call help?
 
Old 08-05-2009, 04:13 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Try ./jboss

By default (and very sensibly so!!) the current working directory
is *not* in your PATH, hence bash knows nothing about what file
you're trying to execute.


Cheers,
Tink
 
Old 08-05-2009, 04:14 AM   #3
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

When in the directory where the file resides type
Code:
./jboss start
Kind regards,

Eric
 
Old 08-05-2009, 04:36 AM   #4
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by EricTRA View Post
Hi,

When in the directory where the file resides type
Code:
./jboss start
Kind regards,

Eric
Thanks for reply. That runs!

But it seems the Jboss is not started. I got message as follow:

Code:
clean-up ...
starting: Jboss
check log file for completion!!
-bash-3.00$
It seems there is problem in the executable file jboss.
 
  


Reply



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
Can't start GDM with a setuid executable bbi5291 Linux - Desktop 2 05-15-2009 10:59 AM
kernel wont start busybox executable miglietto Linux - General 2 12-22-2008 07:23 AM
Howto convert bin file to a executable DOS file lilzz Linux - Newbie 5 08-04-2006 12:03 AM
how do I lauch a file by its executable cjae SUSE / openSUSE 1 07-12-2005 11:51 AM
Linux Executable File Help (created from a .c file) MattG1981 Linux - Newbie 7 06-06-2004 04:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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