Results 1 to 10 of 11
i'm a newbie in linux ....
i downlaoded the j2sdk-1_4_2_12-linux-i586-rpm.bin.bin . i installed it usin the following commands
#sh j2sdk-1_4_2_12-linux-i586-rpm.bin.bin
#rpm -iv j2sdk-1_4_2_12-linux-i586-rpm
i got the installation was successful.but whe ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-11-2006 #1Linux Newbie
- Join Date
- Nov 2005
- Posts
- 176
problerm with java
i'm a newbie in linux ....
i downlaoded the j2sdk-1_4_2_12-linux-i586-rpm.bin.bin . i installed it usin the following commands
#sh j2sdk-1_4_2_12-linux-i586-rpm.bin.bin
#rpm -iv j2sdk-1_4_2_12-linux-i586-rpm
i got the installation was successful.but whe i run the command javac n java i get
bash: java: command not found
even i tried in /usr/java/j2sdk-1_4_2_12/bin commands javac n java
i couldnt recover the error...
plz help me.......!!!!!!!!!
- 07-11-2006 #2So you're saying the /usr/java/j2sdk-1_4_2_12/bin/java command exists, but it gives you an error when you run it? What is the error?
Originally Posted by harishbayyavarapu Registered Linux user #270181
TechieMoe's Tech Rants
- 07-12-2006 #3
Java
Hi ... Java needs exactly one thing to run - a path.
There may be other complications (permissions etc) causing a problem.
Look in /usr/java/j2sdk-1_4_2_12/bin and make sure that:
a. java is there, and
b. users have permission to execute it.
Then try (from the command line) echo $PATH - maker sure /usr/java/j2sdk-1_4_2_12/bin is in the path.
Let us know ...- Clouds don't crash - Bertrand Meyer
registered Linux user 393557
finally - hw to brag about - but next year it will look pitifully quaint:
Athlon64 X2 3800 - 1G PC3200 - 250G SATA - ati radeon x300
circa 2006
- 07-12-2006 #4Linux Newbie
- Join Date
- Nov 2005
- Posts
- 176
So you're saying the /usr/java/j2sdk-1_4_2_12/bin/java command exists, but it gives you an error when you run it? What is the error?
the same error.......
bash: java: command not found
ya i tried echo $PATH i dont have the given path..... i have
/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin
so how could i chage my path
plz help me......i'm damm fed up !!!!!!!
- 07-12-2006 #5
For setting the path variable the syntax is:
PATH= $PATH:/usr/java/j2sdk-1_4_2_12/bin
export PATH
Place this in .profile or .bashrc file in your home directory so that you don't need to do this everytime you login.
- 07-12-2006 #6
Whenever you install java, you need to put it in your path. For Redhat based distros, derivatives and forks (like Mandriva), you can put java in everyones path by simpling placing a bash script in /etc/profile.d, naming it something like java.sh and making it executable. An example of the script I use for Mandriva 2006 and Suse 10.1 is below,
In the script above, java is install in /opt/java, so when modifying the script, make sure the paths match those on your system.Code:#!/bin/sh export JAVA_HOME=/opt/java export MANPATH=$MANPATH:/opt/java/man export PATH=$PATH:/opt/java/bin:/opt/java/jre/bin
- 07-27-2006 #7Just Joined!
- Join Date
- Jul 2006
- Posts
- 1
java bin path needs to be set to $PATH Variable
# rpm -ivh j2sdk-1_4_2_12-linux-i586-rpm
# cd /usr/local
# ln -s /usr/java/j2sdk1.4.2_12 java
# cd /usr/bin
# ln -s /usr/local/java/bin java
Edit or replace the .bash_profile for root user
PATH=$PATH:/usr/bin/java
export PATH
JAVA_HOME=/usr/local/java
resource profile
# . ./.bash_profile
- 08-26-2006 #8Just Joined!
- Join Date
- Aug 2006
- Posts
- 6
your code is confusing.
Originally Posted by vijaysam79
# ln -s /usr/local/java/bin java
ln -s /usr/java/j2sdk1.4.2_12 java
i never heard "java bin"
the directory name is weird.
but thanks for providing info and helping
- 08-26-2006 #9Just Joined!
- Join Date
- Aug 2006
- Posts
- 6
this code is so simple, much easier to understand.
Originally Posted by letmeknowlinux
- 04-05-2011 #10Just Joined!
- Join Date
- Apr 2011
- Posts
- 1




