Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have no root access to java JDK 7 so I install java JDK to a folder and extract it

http://download.oracle.com/otn-pub/java/jdk/7u21-b11/jdk-7u21-linux-i586.tar.gz

Then if I call it:

./bin/java -version

it works and shows the version. but now I want to configure Eclipse to use that new version but it requires to link it to OpenJDK which I dont know how to install it to my desired folder as I did for the step above. so briefly, how can I install openJDK inside my folder and make it work?

Thanks

share|improve this question

migrated from stackoverflow.com Apr 24 '13 at 17:40

This question came from our site for professional and enthusiast programmers.

add comment

3 Answers

edit your eclipse.ini file and add a "-vm" with the full path to the java command to use

share|improve this answer
    
when I dont have privilege means I cant edit that file. –  user2254866 Apr 24 '13 at 15:56
    
Do not install Eclipse from the repositories. That is outdated in almost all distributions. Just unzip a download from the Eclipse website to any directory you like. There you can also edit the eclipse.ini. –  Bananeweizen Apr 24 '13 at 18:58
add comment

Don't sudo apt-get install sun-java7-jdk work as a unprivileged user? (i couldn't comment sorry).

You could check out http://168.site90.net/doku.php?id=ubuntu-download-and-install-jdk-bin

That may help you.

share|improve this answer
    
"sudo (pron.: /ˈsuːduː/[2] or /ˈsuːdoʊ/) is a program for Unix-like computer operating systems that allows users to run programs with the security privileges of another user (normally the superuser, or root)." - en.wikipedia.org/wiki/Sudo –  vijay Apr 24 '13 at 15:45
    
@Tyler no it doesnt work for unprivileged user. –  user2254866 Apr 24 '13 at 15:47
    
Oh okay my bad, never tried anything as a unprivileged user. Thanks for the feedback. –  Tyler Apr 24 '13 at 15:48
add comment

You can try to just download the ubuntu deb packages and extract them to a local folder. Execute apt-get -y --print-uris install openjdk-7-jdk to show you what packages you need, then download and extract them.

script to do everything:

apt-get -y --print-uris install openjdk-7-jdk | grep "http.*deb" -o | xargs wget
for d in *.deb; do dpkg -x "$d" openjdk; done
rm *.deb

Now you should have everything extracted to a folder openjdk.

From what I've tried the java installed like this seems to work fine, you just neet to point eclipse to the new vm.

share|improve this answer
add comment

Your Answer

 
discard

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