Linux - SoftwareThis 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.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
>export CLASSPATH=$CLASSPATH:.
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 ?
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)
-and-
$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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.