GoDaddy 도움말

How to install Java using apt-get

Java is a programming language that's specifically designed to be as platform independent as possible. Developers can write their applications once without the need to recompile a separate version of the application for each platform. The Advanced Packaging Tool is the most common method of installing Java on Debian Linux distributions such as Ubuntu. Apt simplifies software management on these systems by automating much of this process, including the download, configuration and installation of software packages. This example shows how to select a Java Development Kit (JDK) 7 installation package, install it with apt and verify that Java has been properly installed.

DIFFICULTY Basic - 1 | Medium - 2 | Advanced - 3
TIME REQUIRED 15 min
RELATED PRODUCTS Ubuntu-based VPS or dedicated servers

Here is a quick tutorial on how to how to install Java using apt-get.

Select the Java package to install

Open a terminal window and login as root. Execute the following command to list the available OpenJDK packages that can install Java:

# apt-cache search openjdk

Select openjdk-7-jdk for this example, which is the OpenJDK 7 Development Kit.

Install OpenJDK

Enter this command to update the list of available packages from your remote repositories:

# apt-get update

Enter the following command to install the software package you have selected.

# apt-get install openjdk-7-jdk

Press 'y' when prompted to authorize the required storage space for the installation.

Verify that Java has been installed

This command provides the version of Java that was installed:

# java -version

The following screenshot shows that java 1.7.0_65 was installed in this example:


이 글이 도움되었나요?
피드백을 보내주셔서 감사합니다. 고객 서비스 담당자에게 문의하시려면 지원 전화 번호 또는 위의 채팅 옵션을 이용하시기 바랍니다.
도와드릴 수 있어 기쁩니다! 더 도와 드릴 것이 있나요?
그것 유감스럽습니다. 혼동이 되었던 사항 또는 솔루션이 고객님의 문제를 해결하지 못했던 원인을 알려주세요.