java: command not found Debian
Ok i went to do
Code:
java -version Code:
cd /usr/java i am running Debian 6 x64 can someone please help me install java i am trying to run a mc server but i need help with java please help me |
Quote:
Anyway: http://www.google.com/search?client=...hannel=suggest http://wiki.debian.org/Java/Sun Running the following should just work: Code:
apt-get install sun-java6-jdk |
when i try to install i get this
Code:
Reading package lists... Done |
I guess, you are missing the 'non-free' entry in /etc/apt/sources.list
sun-java6-jdk is available http://packages.debian.org/squeeze/sun-java6-jdk http://packages.debian.org/search?ke...=sun-java6-jdk .. Can also be added in Synaptic > Settings > Archives : non-free |
i only have ssh access how can i add it to the resources list ?
|
Ok i added the link to sources.list after that should i do
Code:
apt-get update Code:
java -version |
After # apt-get install sun-java6-jdk :
You can see if 'java -version' replies "java version "1.6.0_2x" etc. If any doubt : # update-alternatives --config java ... and then select the "sun java". . |
i do
Code:
apt-get install sun-java6-jdk Code:
update-alternatives: error: cannot stat /opt/java/64/jre-6u26-linux-x64.bin/bin/java: Not a directory |
anyone any idea?
|
can someone help me resolve this issue please ?
|
Probably : # apt-get -f install && apt-get update
.. to be able to install packages again. Next : ls -l /etc/alternatives/ | grep opt And then remove the link / links pointing to the alien java* in /opt/. Now it should be possible to install : # apt-get install sun-java6-jdk Hopefully the correct links will be made in /etc/alternatives, making it possible for # 'update-alternatives --config java' to select "/ust/lib/jvm/java-6-sun/jre/bin/java". ( Or see, that it has been set already by the install of sun-java6-jdk.) (( Can be checked with 'java -version' too.)) .. |
All times are GMT -5. The time now is 10:32 AM. |