1824832 Members
4046 Online
109674 Solutions
New Discussion юеВ

java problem

 
Sandeep Daphal
Frequent Advisor

java problem

I am install java1.5 on hpux11i & it show in swlist but it not show in when i press comman which java form root it given error as following

# which java
no java in /usr/sbin /bin /usr/bin /usr/dt/bin /usr/bin/X11 /sbin /opt/Migration/bin /usr/vue/bin /usr/ccs/bin /usr/contrib/bin /opt/hparray/bin /opt/nettladm/bin /opt/upgrade/bin /opt/fcms/bin /usr/contrib/bin/X11 /opt/graphics/common/bin /opt/pd/bin /opt/resmon/bin /opt/gnome/bin /opt/mozilla /opt/wbem/bin /opt/wbem/sbin /opt/netscape /usr/local/bin /opt/atok/bin /opt/egb/bin /opt/graphics/phigs/bin /usr/sbin/diag/contrib /opt/mx/bin /opt/OpenSource/bin /opt/vje/bin /opt/perl/bin
#


please help me

Sandeep Daphal
12 REPLIES 12
Fred Ruffet
Honored Contributor

Re: java problem

Just add your path to java in /etc/PATH. Next connections will include it.

Following should do the trick :
echo ":/opt/java1.5/bin" >> /etc/PATH
Then open a new login shell.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Anshumali
Esteemed Contributor

Re: java problem

MAN says: which searches for the file that would be executed if name were given as a command, and displays the absolute path of that file. Each argument is expanded if it is aliased, and searched for along the user's path.
As suggested add, :/opt/java1.5/bin in your path, you should be able to see it.
Cheers!!
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Sandeep Daphal
Frequent Advisor

Re: java problem

Fred i try but its not working
java install ptah is /opt/java1.5/jre/bin.

Steven E. Protter
Exalted Contributor

Re: java problem

Shaom Sandeep,

you may need to set the JAVA_PATH variable.

For grins:

swlist -l product | grep -i java

If java does not work, try jre or jdk

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sandeep Daphal
Frequent Advisor

Re: java problem


This is out put of # swlist -l product | grep -i java
ISEE-Java A.01.31.12 RST Java Runtime13-13109
Java-PlugIn1-2 1.2.2.15.00 Plug-In for Java 2
Java2RTE_base 1.2.2.15.00 Java 2 RTE (700/800), PA1.1 Portable
Java2RTE_doc 1.2.2.15.00 Java 2 RTE (700/800), Distribution License
Java2RTE_perf 1.2.2.15.00 Java 2 RTE (700/800), PA2.0 Performance Add On
Jdk13 1.3.1.13.01 Java2 1.3 SDK
Jdk14 1.4.2.04.00 Java2 1.4 SDK
Jdk15 1.5.0.08.00 Java 1.5 JDK
Jpi13 1.3.1.13.01 Java2 1.3 Netscape Plugin
Jpi14 1.4.2.04.00 Java2 1.4 Netscape Plugin
Jre13 1.3.1.13.01 Java2 1.3 RTE 1.3
Jre14 1.4.2.04.00 Java2 1.4 RTE
Jre15 1.5.0.08.00 Java 1.5 JRE
Jre15 1.5.0.01.00 Java 1.5 JRE

Dennis Handly
Acclaimed Contributor

Re: java problem

If you know java is in /opt/java1.5/jre/bin/, you should add that to your PATH.
Sandeep Daphal
Frequent Advisor

Re: java problem

I set path using the following command
#PATH=$PATH:/opt/java1.5/jre/bin
after give this path the path is been set temparly. please tell me how to set the path permantly?

Dennis Handly
Acclaimed Contributor

Re: java problem

>please tell me how to set the path permanently?

As mentioned by others, you either need to get the entry into /etc/PATH, or add that to your .profile. If you want it for everyone on the system, /etc/PATH is the way to go.

Typically once it is in /etc/PATH, you do something like:
# PATH=$PATH:$(< /etc/PATH)
(This may be in /etc/profile.)
Padma Asrani
Honored Contributor

Re: java problem

Hi Sandeep

>> I set path using the following command
>>#PATH=$PATH:/opt/java1.5/jre/bin
>>after give this path the path is been set >>temparly. please tell me how to set the path >>permantly?


I guess you are just saying
PATH=$PATH:/opt/java1.5/jre/bin
after that you need to export PATH
export PATH

If you wanted to save it permanently then it should be in the .profile file of root.

Regards
PAdma
Sandeep Daphal
Frequent Advisor

Re: java problem

THank for help after export path problem solved.
Dennis Handly
Acclaimed Contributor

Re: java problem

You have only assigned points to one response in another thread. If you have gotten answers that were helpful, please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
Dennis Handly
Acclaimed Contributor

Re: java problem