Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to install a JDK on Linux (specifically RH 7.x) so that it exists in only a specific user's space?

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

Download the JDK unpack, add "bin/" to your $PATH and change/add $CLASSPATH, $JAVAHOME if needed.

Ex:

$ cd
$ mkdir -p java/src/
$ mv jdk-6u12-linux-i586.bin java/src/
$ cd java/src/
$ chmod ug+x jdk-6-linux.bin 
$ ./jdk-6-linux.bin
$ cp -R jdk1.6.0_12/* ../
$ cd
$ echo "PATH=\$HOME/java/bin/:\$PATH" >> .bash_profile
$ source .bash_profile

And your'e done..

share|improve this answer
    
In other words, not the RPM but the tar-ball. –  Thorbjørn Ravn Andersen Aug 27 '09 at 5:39
add comment

What's stopping you just using discretionary access control (i.e. users and groups) to achieve this?

share|improve this answer
    
For one user, the solution proposed by rkthkr is the easiest –  fpmurphy1 Aug 25 '09 at 15:05
    
The extreme rust on all of my Unix/Linux knowledge. Prior to last week, I haven't launched PuTTY since June of 2007. :-) –  IVR Avenger Aug 25 '09 at 15:24
    
No idea why this was downvoted. It's a legitimate answer, particularly if later more users are supposed to get access. –  sleske Nov 26 '09 at 14:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.