Currently, I'm trying to launch a java program on a server. The server is launched on my virtual machine (VirtualBox) and controlled over SSH. Its OS is Debian. So, in order to launch my program I need jdk7. I've downloaded its tar.gz archive to the server and extracted it to /usr/java. But the system can't see the new jdk. When I type "java -version" in my terminal it writes 1.6 instead of desired 1.7. So, a trivial question: how can I install jdk7 on Debian? (No GUI is available).
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
||||
|
Simply extracting the archive's contents will not install your software. Check the folder where you extracted the files, there will be installation instructions there. You can also try following this guide to create a debian package from the tar.gz archive. Finally, jdk1.7 is in Debian's "experimental" repository. You can edit
Then run these commands:
WARNING: Depending on how up to date your system is, many packages might need to be updated which could result in an unstable system. Make sure you change your |
|||
|
/usr/java/wont be in your path (or indeed/usr/if you put the java executable directly in there). You already have some varient of java installed which is giving you the 1.6 - probably from a package. Typedpkg -S `which java`, what comes up? – didster Oct 11 '12 at 14:54/usr/bin/javathat has got there from some other way - probably a manual install. Dols -laF /usr/bin/javaand see what that gives you - does it point to/etc/alternatives/java? If so, please then runupdate-alternatives --list javaand post the results. There are many different ways of getting Java on Debian. Also post the list of directories under/usr/java/– didster Oct 11 '12 at 18:04