pvinodp
asked on
"which java" is not wokring
In my java aplication, hosted on jboss, there is a this situation:
# jre is installed
# but I dont get any thing if a execute "which java"
# executing "java -version" also does not work.
So commands like java -cp [XYZ] give error like
java: command not found
Any help?
# jre is installed
# but I dont get any thing if a execute "which java"
# executing "java -version" also does not work.
So commands like java -cp [XYZ] give error like
java: command not found
Any help?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've requested that this question be deleted for the following reason:
We are still unable to solve the ssue. I am goging to delete this question. Kindly revert in case u have any other steps...
We are still unable to solve the ssue. I am goging to delete this question. Kindly revert in case u have any other steps...
I just used '/usr/java/jdk.version/bin /' as an example.
Did you run the locate and/or find commands?
Bottom line -- if java is installed, but not showing up when you issue 'which java', then it is not in your path.
Did you run the locate and/or find commands?
Bottom line -- if java is installed, but not showing up when you issue 'which java', then it is not in your path.
ASKER
ok. but how do u set it?
I dont want to disturb .bashrc on the affected system [sysA].
I insist this because another system [sysB] in the cluster has the same content in .bashrc and it does return the path /usr/bin/java on executing "which java".
but the sysA does show installation of jre.
I dont want to disturb .bashrc on the affected system [sysA].
I insist this because another system [sysB] in the cluster has the same content in .bashrc and it does return the path /usr/bin/java on executing "which java".
but the sysA does show installation of jre.
Still waiting to hear if you got any results from the find or locate commands I originally posted.
Add this to this list:
Add this to this list:
rpm -qa|grep -i java
ASKER
The locate java and find java command resulted in showing the installed jre 1.4 .
I cant access the system right now... It is at the customer lab .. I shall try "rpm -qa****" and let you know..
Any other way u think of mentioning? Because i get only limited time to check on the system.
I cant access the system right now... It is at the customer lab .. I shall try "rpm -qa****" and let you know..
Any other way u think of mentioning? Because i get only limited time to check on the system.
Which Linux distro and version are you running? How did you install the jre?
Objecting as "Far from done".
ASKER
it is rhel5 .. I am not sure, but they would have installed using rpm -ivh jre1.4$$$.rpm
ASKER
Thanks all for your contribution
ASKER
It has jre installed. And another system in the cluster is also in the same state : jre installed and nothing in .bashrc except sourcing /etc/bashrc.
But the command which java , java -version , and java -cp works in that system.
Any clue now?