LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-19-2007, 02:27 PM   #1
gobicse
LQ Newbie
 
Registered: Dec 2007
Posts: 9

Rep: Reputation: 0
Exclamation bash command not found


hi

i am trying to run a java program in red hat linux 9 terminal.

i got the following message. i tried to solve it.. but i dunno..
kindly help me...

___________________________________________--
[root@localhost bin]# ls
appletviewer idlj javadoc jconsole jmap jstat pack200 samplejava.txt tnameserv
apt jar javah jcontrol jps jstatd policytool Samplejava.txt unpack200
ControlPanel jarsigner javap jdb jrunscript keytool rmic schemagen wsgen
extcheck java java-rmi.cgi jhat jsadebugd native2ascii rmid serialver wsimport
HtmlConverter javac javaws jinfo jstack orbd rmiregistry servertool xjc
[root@localhost bin]# vi HelloWorld.java
[root@localhost bin]# javac Helloworld.java
bash: javac: command not found

----------------------------------------------
what is that bash command not found...
 
Old 12-19-2007, 02:31 PM   #2
zoranp
Member
 
Registered: Nov 2007
Location: Belgrade, RS
Distribution: Mandriva 2009.0 X86_64
Posts: 44

Rep: Reputation: 15
Don't shoot the messenger. Bash is shell reporting the problem.

Executable named javac is not present in your path.
 
Old 12-19-2007, 02:42 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Do you know that "javac" is on your system? (Use find or locate, or maybe "man javac")

You need to have the pathname in your PATH variable, or you need to simply enter the full path---eg: /usr/bin/javac

To run something in the current directory: ./javac ("." means "current directory", and thus is read as a full pathname)
 
Old 12-19-2007, 05:46 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,309

Rep: Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744
FYI, RH9 is yrs out of date and does not have updates, inc security. Highly recommend you get a current distro eg RH Fedora 7 or 8.
 
  


Reply


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
bash: command not found hamish Linux - Newbie 7 02-23-2011 04:28 PM
Bash command not found Legolas327 Linux - Newbie 9 06-27-2007 07:44 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM
-bash: ls: command not found jchun Linux - General 3 11-02-2004 10:11 AM
bash: ll: command not found x2000koh Linux - Newbie 3 08-08-2003 05:11 AM

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

All times are GMT -5. The time now is 09:36 PM.

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