Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Steps to build a JDK environment

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "the steps of building JDK environment". Friends who are interested may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the steps of building a JDK environment.

Before installing Spark, we need to install jdk and scala on our system, as well as the download link for spark

JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Scala: http://www.scala-lang.org/download/

Install JDK

First, let's install jdk and create a jdk folder in the following directory:

Sudo mkdir / usr/lib/jdk

Use this statement to create the jdk installation directory, which we plan to install in the / usr/lib/jdk directory.

Then change to the directory where the jdk package is located. For example, here we put the package in the ~ / Desktop directory.

Cd ~ / Desktop

Execute the extract command to extract the package to the / usr/lib/jdk directory:

Sudo tar-zxvf jdk-8u151-linux-x64.tar.gz-C / usr/lib/jdk

Note that root permission is required here. Otherwise, there is no way to write data to the / usr/lib/jdk directory.

Then we need to configure the PATH path so that the jdk command can be executed directly under any path

Sudo vim / etc/profile

The changes to / etc/profile will have an effect on all users after restart, adding at the end of the configuration file:

Export JAVA_HOME=/usr/lib/jdk/jdk1.8.0_151

Export JRE_HOME=$ {JAVA_HOME} / jre export CLASSPATH=.:$ {JAVA_HOME} / lib:$ {JRE_HOME} / lib

Export PATH=$ {JAVA_HOME} / bin:$PATH

The path to JAVA_HOME is configured according to the directory you unzipped.

Then press esc to exit edit mode, enter command mode, type: W to save, and then: Q to exit vim editor

Source / etc/profile

At this point, I believe you have a deeper understanding of the "steps to build a JDK environment". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report