Operating System - HP-UX
1821638 Members
3048 Online
109633 Solutions
New Discussion юеВ

java execute permission denied

 
SOLVED
Go to solution
Subentu
Frequent Advisor

java execute permission denied

I have a Rx7620 server.

When I try to run java as the user "reports" (java home directory in his home folder - /home/reports/apps/javaapp/jre1.6.0_04/bin), it gives the following error message:

su: /home/reports/apps/javaapp/jre1.6.0_04/bin/java: Execute permission denied.

I added these entries to the .profile file of the user "reports", but it still doesn't work.

export JAVA_HOME=/home/reports/apps/javaapp/jre1.6.0_04/bin/java

export PATH=$PATH:/home/reports/apps/javaapp/jre1.6.0_04/bin/

The same error message is given when I try to run it as the root.

Can you guys please help me.

Thanks
19 REPLIES 19
Jeeshan
Honored Contributor

Re: java execute permission denied

hi subentu

did you check the execute permission in
home/reports/apps/javaapp/jre1.6.0_04/bin/java ??
a warrior never quits
Yogeeraj_1
Honored Contributor

Re: java execute permission denied

hi,

is this a new installation?

Please post the output of the following command:
ll /home/reports/apps/javaapp/jre1.6.0_04/bin/java

revert!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Subentu
Frequent Advisor

Re: java execute permission denied

Thanks for the quick replies.

the output:
-rwxrwxrwx 1 reports users 47116 May 15 14:10 /home/reports/apps/javaapp/jre1.6.0_04/bin/java
Yogeeraj_1
Honored Contributor

Re: java execute permission denied

hi again,

can you also try the following command as the reports user:
cd /home/reports/apps/javaapp/jre1.6.0_04/bin/

./java -version


revert!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Subentu
Frequent Advisor

Re: java execute permission denied

Java version is jre1.6.0_04

requested output is:

$ cd /home/reports/apps/javaapp/jre1.6.0_04/bin/
$ java -version
su: java: Execute permission denied.
$

Thanks
Yogeeraj_1
Honored Contributor

Re: java execute permission denied

hi,

>$ cd /home/reports/apps/javaapp/jre1.6.0_04/bin/
>$ java -version
>su: java: Execute permission denied.
>$

Please run the java command as follows (using the "./")
./java -version

We need to make sure that the java is really from the mentioned directory.

Also post the output of:
echo $PATH


revert!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Subentu
Frequent Advisor

Re: java execute permission denied

$ ./java -version
su: ./java: Execute permission denied.


echo $PATH
/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/contrib/kwdb/bin:/usr/bin/X11:/opt/graphics/common/bin:/opt/upgrade/bin:/opt/ipf/bin:/opt/resmon/bin:/opt/ignite/bin:/opt/sec_mgmt/bastille/bin:/opt/gnome/bin:/opt/mozilla:/opt/wbem/bin:/opt/wbem/sbin:/opt/mx/bin:/opt/sec_mgmt/spc/bin:/opt/perf/bin:/opt/hpnpl//bin:/usr/local/bin:/usr/contrib/bin/X11:/home/reports/apps/javaapp/jre1.6.0_04/bin/:/usr/contrib/bin:/usr/sbin:/app/oracle/product/9.2.0/bin


Thanks
Yogeeraj_1
Honored Contributor

Re: java execute permission denied

hi again,

is this a new installation?

Post the output of:
file java


It could also be that the version is not right!
Where did you download this software from?

Post more information like:
OS version
OS mode

revert!



kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Subentu
Frequent Advisor

Re: java execute permission denied

output is

# file java
java: cannot open
#


OS is 11iv2
Im running multiuser mode

Can it be a bad installation?

Thanks

Jeeshan
Honored Contributor

Re: java execute permission denied

run as report user

$whereis java

did you modify the .profile of report user and relogin and trying?

a warrior never quits
TTr
Honored Contributor

Re: java execute permission denied

> $ cd /home/reports/apps/javaapp/jre1.6.0_04/bin/
> $ java -version
> su: java: Execute permission denied


> $ ./java -version
> su: ./java: Execute permission denied.

why does the "su" come up everytime you run java? Is "java" replaced by a script that contains the su command? Or is it an shell alias?

In the first example the "java" is run without an absolute path so an alias or a script in the PATH would have been picked up before the java binary (the java path is appended at the end of the PATH).

In the second example the ./java is run from the current directory we do not know if you had cd to the java bin directory.

Run the following commands

which java
alias java
file /home/reports/apps/javaapp/jre1.6.0_04/bin/java
what /home/reports/apps/javaapp/jre1.6.0_04/bin/java

It is possible that you downloaded the wrong platform java RTE.


ubuntu
Occasional Contributor

Re: java execute permission denied

Thanks for the replies.

I have no idea why su comes up.

I re-ran the commands with absolute paths here:

$ /home/reports/apps/javaapp/jre1.6.0_04/bin/java
su: /home/reports/apps/javaapp/jre1.6.0_04/bin/java: Execute permission denied.

$ /home/reports/apps/javaapp/jre1.6.0_04/bin/java -version
su: /home/reports/apps/javaapp/jre1.6.0_04/bin/java: Execute permission denied.

here are the outputs you requested:

$ which java
/home/reports/apps/javaapp/jre1.6.0_04/bin//java

$ alias java
java: shell alias not found.

$ file /home/reports/apps/javaapp/jre1.6.0_04/bin/java
/home/reports/apps/javaapp/jre1.6.0_04/bin/java: ELF-32 executable object file

$ what /home/reports/apps/javaapp/jre1.6.0_04/bin/java
/home/reports/apps/javaapp/jre1.6.0_04/bin/java:

I will check with the installation

Thanks

Robert-Jan Goossens_1
Honored Contributor

Re: java execute permission denied

ehhh

home/reports/apps/javaapp/jre1.6.0_04/bin/java: ELF-32 executable object file

You running a 32bit version on a 64 bit server!

which java version did you download and what OS version are you running?
TTr
Honored Contributor
Solution

Re: java execute permission denied

> I have a Rx7620 server.

RX means that you need the "itanium JRE 6.0.0" from

http://h20392.www2.hp.com/portal/swdepot/try.do?productNumber=JDKJRE6000
TTr
Honored Contributor

Re: java execute permission denied

Did the java in /home/reports/apps/javaapp/jre1.6.0_04 come with the "report application" that you are using? If so maybe they supplied the wrong version and you should check with them. I you installed it yourself, download the correct one from the web site.

The HP-UX provides java under /opt so you could try the system supplied one by adjusting the JAVA variables for the "reports" user. Or, after you install the right version and platform in /opt, create a symbolic link in /home/reports/apps/javaapp pointing to the /opt/java1.6 area. You may have to adjust the link paths up or down one level depending on the installation directory tree.
Subentu
Frequent Advisor

Re: java execute permission denied

Thanks a heap guys. All of you have been really helpful.

Thanks again.
Dennis Handly
Acclaimed Contributor

Re: java execute permission denied

>Robert-Jan: .../jre1.6.0_04/bin/java: ELF-32 executable object file
>You running a 32bit version on a 64 bit server!

So? There is nothing wrong with that. HP-UX is quite happy running 32 bit applications.
But there is something missing on the end:
/usr/bin/ksh: ELF-32 executable object file - IA64

So the problem could be due to running a foreign devil java.
Dennis Handly
Acclaimed Contributor

Re: java execute permission denied

You can also get just "ELF-32 executable object file" if you are on 11.11 and you use file(1) on an IPF executable.
Subentu
Frequent Advisor

Re: java execute permission denied

I have got the solutions for my problem. Thanks everyone.