官术网_书友最值得收藏!

Installation on Linux

There are several ways to install Java on Linux, depending on its flavor. Here, I will describe an installation method that works more or less the same way on all flavors. The one I used is Debian.

First step is the same as in any other operating system: download the installation kit. In the case of Linux, you should select a package that has a tar.gz ending. This is a compressed archive format. You should also carefully select the package that matches the processor in your machine and the 32/64 bit version of the operating system. After the package is downloaded, you have to switch to root mode, issuing the su command. This the first command you can see on the screenshot that shows the installation commands.

The tar command uncompressed the archive into a subfolder. In Debian, this subfolder has to be moved to /opt/jdk and the mv command is used for this purpose. The two update-alternatives command is Debian-specific. These tell the operating system to use this newly installed Java in case there is already an older Java installed. The Debian I was using to test and demonstrate the installation process on a virtual machine came with a 7 year old version of Java.

The final step of the installation is the same as any other operating system: checking that the installation was successful in issuing the java -version command. In the case of Linux, this is even more important because the installation process does not check that the downloaded version matches the operating system and the processor architecture.

主站蜘蛛池模板: 兰溪市| 武邑县| 古丈县| 漾濞| 丰县| 阿克| 浦东新区| 衡水市| 通渭县| 临武县| 陈巴尔虎旗| 呼玛县| 正蓝旗| 深州市| 和龙市| 米林县| 安吉县| 中西区| 揭阳市| 东光县| 通许县| 灵台县| 资源县| 西吉县| 邹平县| 苏尼特右旗| 新田县| 炉霍县| 图片| 莆田市| 永胜县| 徐汇区| 青浦区| 静乐县| 天门市| 丹棱县| 尚义县| 大冶市| 乐清市| 郯城县| 宁波市|