Something wrong in my openjdk,i purge it and reinstall it.#  apt-get remove --purge openjdk-7-jre    Reading package lists... Done    Building dependency tree           Reading state information... Done    The following packages will be REMOVED:      openjdk-7-jre*    0 upgraded, 0 newly installed, 1 to remove and 1128 not upgraded.    After this operation, 508 kB disk space will be freed.    Do you want to continue [Y/n]? y    (Reading database ... 117956 files and directories currently installed.)    Removing openjdk-7-jre:i386 ...    update-alternatives: warning: alternative /usr/lib/jvm/java-6-openjdk-i386/jre/bin/policytool (part of link group policytool) doesn't exist; removing from list of alternatives    update-alternatives: warning: alternative /usr/lib/jvm/java-7-openjdk-i386/jre/bin/policytool (part of link group policytool) doesn't exist; removing from list of alternatives    update-alternatives: warning: alternative /usr/lib/jvm/java-8-oracle/jre/bin/policytool (part of link group policytool) doesn't exist; removing from list of alternatives    update-alternatives: warning: /etc/alternatives/policytool is dangling; it will be updated with best choice    Processing triggers for desktop-file-utils ...    Processing triggers for hicolor-icon-theme ...    root@localhost:/home/debian# apt-get install openjdk-7-jre    Reading package lists... Done    Building dependency tree           Reading state information... Done    The following NEW packages will be installed:      openjdk-7-jre    0 upgraded, 1 newly installed, 0 to remove and 1128 not upgraded.    Need to get 0 B/215 kB of archives.    After this operation, 508 kB of additional disk space will be used.    Selecting previously unselected package openjdk-7-jre:i386.    (Reading database ... 117932 files and directories currently installed.)    Unpacking openjdk-7-jre:i386 (from .../openjdk-7-jre_7u79-2.5.5-1~deb7u1_i386.deb) ...    update-alternatives: warning: alternative /usr/lib/jvm/java-8-oracle/jre/bin/javaws (part of link group javaws) doesn't exist; removing from list of alternatives    update-alternatives: warning: /etc/alternatives/javaws is dangling; it will be updated with best choice    Processing triggers for hicolor-icon-theme ...    Processing triggers for desktop-file-utils ...    Setting up openjdk-7-jre:i386 (7u79-2.5.5-1~deb7u1) ...    update-alternatives: using /usr/lib/jvm/java-7-openjdk-i386/jre/bin/policytool to provide /usr/bin/policytool (policytool) in auto mode    # java -version    bash: /usr/bin/java: No such file or directory    How to make a link to make use of openjdk?  root@localhost:/home/debian# locate java/etc/.java/etc/java-6-openjdk/etc/javascript-common/etc/.java/.systemPrefs/etc/.java/.systemPrefs/.system.lock/etc/alternatives/java/etc/alternatives/java.1.gz/etc/alternatives/javac/etc/alternatives/javac.1.gz/etc/alternatives/javadoc/etc/alternatives/javadoc.1.gz/etc/alternatives/javafxpackager/etc/alternatives/javafxpackager.1.gz/etc/alternatives/javah/etc/alternatives/mozilla-javaplugin.so/etc/apache2/conf.d/javascript-common.conf/etc/java-6-openjdk/accessibility.properties/etc/java-6-openjdk/calendars.properties/etc/java-6-openjdk/content-types.properties/etc/java-6-openjdk/flavormap.properties/etc/java-6-openjdk/fontconfig.properties/etc/java-6-openjdk/images/etc/java-6-openjdk/jvm-i386.cfg/etc/java-6-openjdk/logging.properties/etc/java-6-openjdk/management/etc/java-6-openjdk/net.properties/etc/java-6-openjdk/psfont.properties.ja/etc/java-6-openjdk/psfontj2d.properties/etc/java-6-openjdk/security/etc/java-6-openjdk/sound.properties/etc/java-6-openjdk/swing.properties/etc/java-6-openjdk/tz.properties/etc/java-6-openjdk/images/cursors/etc/java-6-openjdk/images/cursors/cursors.properties/etc/java-6-openjdk/management/jmxremote.access/etc/java-6-openjdk/management/jmxremote.password/etc/java-6-openjdk/management/management.properties/etc/java-6-openjdk/management/snmp.acl/etc/java-6-openjdk/security/java.policy/etc/java-6-openjdk/security/java.security/etc/java-6-openjdk/security/nss.cfg/etc/javascript-common/javascript-common.conf/etc/ssl/certs/java/home/debian/.java/home/debian/.config/libreoffice/3/user/config/javasettings_Linux_x86.xml/home/debian/.java/deployment/home/debian/.java/fonts/home/debian/.java/deployment/CacheUpgrade.properties/home/debian/.java/deployment/cache/home/debian/.java/deployment/config.cache/home/debian/.java/deployment/deployment.propertieroot@localhost:/home/debian# apt-get install openjdk-7-jre-headlessReading package lists... DoneBuilding dependency tree       Reading state information... Doneopenjdk-7-jre-headless is already the newest version.openjdk-7-jre-headless set to manually installed.0 upgraded, 0 newly installed, 0 to remove and 1128 not upgraded.root@localhost:/home/debian# java -versionbash: java: command not foundroot@localhost:/home/debian# 
How to install openjdk properly?
java