Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-04-2005, 11:16 PM   #1
LQ Newbie
Registered: Feb 2005
Posts: 10

Rep: Reputation: 0
javac not found

I have installed Java on Mandrake 10.1
The file name I downloaded was something jre-1_5_0_01-i586_rpm.bin
I logged in as root and created a directory java in usr/local/
I extracted the files and I found the directory java/jre-1.5.0_01 under /usr
I set the path using
export JAVA_HOME=/usr/java/jre1.5.0_01
export PATH=$PATH:JAVA_HOME/bin:

When I run the command >javac
It says bashc: javac not found

Then I put

Still I am not able to run javac command.

Where have I gone wrong ?
I added the path /usr/java/jre1.5.0_01/bin to the PATH variable in profile file.

Still I am not able to run java command from any other directory other than /usr/java/jre1.5.0_01/bin direcrtory

Also I see that there is no javac file in the bin directory.

Can somebody please help and tell me exactly what do I do after installing Java ?
Old 02-04-2005, 11:25 PM   #2
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi there

u need to add the path to


and then run


please post ur questions in appropriate forum ,not in this forum

Old 02-04-2005, 11:34 PM   #3
LQ Newbie
Registered: Feb 2005
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for quick reply.

Sorry, I did not know that there are different forums on various subject. Can you tell me which is the appropriate forum ?

Can you please tell me what is this file ?

You mean I need to type the following lines

export JAVA_HOME=/usr/java/jre1.5.0_01
export PATH=$PATH:JAVA_HOME/bin:

in and not in .profile file so that all users can run java ?
Old 02-05-2005, 12:06 AM   #4
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
try adding this


to /etc/

and run


and for problems like these u can post them in the linux-newbie,software section

Old 02-05-2005, 03:23 PM   #5
LQ Newbie
Registered: Feb 2005
Posts: 2

Rep: Reputation: 0
It seems to me that you have downloaded the runtime, only. If you want to use the compiler, you should download a full j2sdk and install that. In my installation (which is 1.4.2), in the jre/bin subfolder of the installed structure, there are no javac command, only the java command which is the runtime, so I guess that your requirement to use the compiler also requires you to install the SDK.

When installed (i guess you just have to gunzip/untar the thing you download), you should set JAVA_HOME to the <sdk_install_folder> and update your path to point to <sdk_install_folder>/bin.

Be sure to place the definition of the bin folder early enough in the path, as some Linx distros comes with a default java runtime.

To review that everything is ok, you should do

$ which java
/usr/local/bin/java (my location)

$which javac
/usr/local/bin/javac (my location)

The try to run the VM:

$ java -version
java version "1.4.2_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-b05)
Java HotSpot(TM) Client VM (build 1.4.2_07-b05, mixed mode)

in order to verify that the version you are running is the same as the one you installed (untarred).
The version of your java installation should read 1.5.0_01
Old 02-06-2005, 01:51 PM   #6
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Moved: This thread is more suitable in Linux-Software and has been moved accordingly to help your thread/question get the exposure it deserves.


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: javac: command not found??? MRAB54 Linux - Newbie 6 02-18-2015 08:18 AM
javac not found rchillal Linux - Newbie 7 02-07-2005 09:15 AM
javac zaicheke Programming 2 10-05-2004 10:46 PM
-bash-- javac command not found nedian123 Programming 1 06-28-2004 04:16 PM
J2sdk problem Javac command not found CollestonPie13 Linux - Software 3 02-15-2004 11:30 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:16 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
Open Source Consulting | Domain Registration