Home System Tutorial LINUX Guide to installing Scala and Sun JDK on CentOS7.0

Guide to installing Scala and Sun JDK on CentOS7.0

Jan 02, 2024 pm 04:20 PM
jdk scala sun

Today I installed Scala on centOS7.0 and found that the installed cenos7.0 has its own java-openjdk-headle.x86_64. I tried to see if it works but found that when I ran the .java source program, I found that the javac command could not be used. I had to uninstall the one that comes with the OS and install the jdk that comes with sun.

1. First check the openjdk package that comes with the OS

[root@mycentos01 bin]# rpm -qa | grep java java-1.7.0-openjdk-1.7.0.512.4.5.5.el7.x86_64
Copy after login

2. Uninstall related openjdk

[root@mycentos01 bin]#rpm -e --nodeps java-openjdk-headle.x86_64
Copy after login

3. Install jdk under your own sun official website

[root@mycentos01 bin]# tar -zxvf jdk-8u121-linux-x64.tar.gz
Copy after login

4. Install the Scala you downloaded

[root@mycentos01 bin]# tar -xzvf scala-2.10.6.tgz 
Copy after login

5. Configure your own environment variables

[root@mycentos01 bin]# vim /etc/profile 
Copy after login

CentOS7.0安装Scala和sun jdk的方法

6. Refresh the configuration file to make the configuration take effect

[root@mycentos01 bin]# source /etc/profile
Copy after login

Now enter java -version and scala -version to check the installation status. ^-^.

Today I also discovered a previous method of changing the host name of centOS7. I tried it but it didn’t work. I don’t know why I used the command to write HOSTNAME=" a name what I want my computer called." to the "/etc/sysconfig/network" file. It does not work after restarting, and make sure the input is the correct host name. Finally, use the hostnametcl tool to change it to a static host name. The command: "[root@mycentos01 bin]#hostnamectl set-hostname "your computer name you want to set ” ”

The above is the detailed content of Guide to installing Scala and Sun JDK on CentOS7.0. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to install Java on Windows 11 How to install Java on Windows 11 Apr 13, 2023 pm 09:22 PM

Despite the large number of applications that appear every once in a while, Java remains by far one of the most used and important programming languages. Many applications rely on Java on Windows operating systems, and updating it means improving performance by providing stability and security for Java applications to run safely. You can also install Java on Linux and macOS platforms. The only difference is the package/file for each platform. Now, with Windows 11, it’s time to download Java and in today’s article, we will take you through the simple steps to install it on your device. Which version of Java should I download? The Java version you downloaded

Does oracle database require jdk? Does oracle database require jdk? Jun 05, 2023 pm 05:06 PM

The oracle database requires jdk. The reasons are: 1. When using specific software or functions, other software or libraries included in the JDK are required; 2. Java JDK needs to be installed to run Java programs in the Oracle database; 3. JDK provides Develop and compile Java application functions; 4. Meet Oracle's requirements for Java functions to help implement and implement specific functions.

Analysis of JDK dynamic proxy examples in java Analysis of JDK dynamic proxy examples in java Apr 30, 2023 pm 01:16 PM

1. Explain that Java provides a dynamic proxy class Proxy. Proxy is not the class of what we call proxy objects, but provides a static method (newProxyInstance) to create proxy objects to obtain proxy objects. 2. Instance publicclassHelloWorld{publicstaticvoidmain(String[]args){//Get the proxy object ProxyFactoryfactory=newProxyFactory();SellTicketsproxyObject=factory.getProxyObject();proxyO

Deepin Linux system installation JDK tutorial Deepin Linux system installation JDK tutorial Feb 15, 2024 pm 12:36 PM

Deepin Linux system is a domestic operating system based on the Linux kernel. It has the characteristics of stability, security, and ease of use. In Deepin Linux system, installing JDK (Java Development Kit) is a necessary step for developing Java applications. This article will introduce in detail how to Install JDK in Deepin Linux system. Installation steps: Open the terminal of Deepin Linux system. Use the command line to download the JDK installation package. The command is as follows: ``shellsudoapt-getinstallopenjdk-11-jdk`` Wait for the download to complete and the system will automatically install the JDK. To verify whether the JDK is installed successfully, enter the following command: ```javaj

Where is the linux jdk directory? Where is the linux jdk directory? Mar 22, 2023 am 09:52 AM

The linux jdk directory is in the bin directory. The specific search method is: 1. Find the execution directory of javad through the "whereis java" command; 2. Find the link file through the execution file; 3. Through "ls -lrt /etc/alternatives/java" Just run the command to find the installation directory.

Differences in language features between Golang and Scala Differences in language features between Golang and Scala Jun 02, 2024 pm 01:17 PM

The difference in language features between Go and Scala is: Type system: Go uses a static type system, while Scala uses a mixed type system. Concurrency: Go is based on lightweight goroutines, while Scala uses an Akka-based actor model. Generics: Go offers experimental generics features, while Scala has a mature generics system. Functional programming: Scala is influenced by functional programming and supports pattern matching and higher-order functions, while Go only supports some functional programming concepts. Ecosystem: The Go ecosystem is huge, while Scala is relatively small.

How Java and Scala implement object-oriented programming How Java and Scala implement object-oriented programming May 07, 2023 pm 01:46 PM

Scala package: basic syntax: package name. Class name The three major functions of Scala packages: distinguishing classes with the same name. When there are many classes, it can well manage the class control access scope. Naming convention of package name: generally lowercase letters + small letters Dot com.Company name.Project name.Business module name Benefits of writing packages: In Maven, you can import the packages you write into the project through Maven. The unique package writing method in Scala does not correspond to the folder and can exist independently. The picture below is the package I built under the class. Just like a normal package, the package can be nested. The inner layer calls the outer layer and does not need to import the package. Atguigu package, under Techer, the outer layer calls the inner object and needs to import the package. The following code: packagechapter04o

How to install jdk-jdk installation tutorial How to install jdk-jdk installation tutorial Mar 04, 2024 pm 05:10 PM

Recently, many friends have asked me how to install jdk. Next, let us learn all about how to install jdk. I hope it can help everyone. 1. First download the JDK installation file and enter the JDK installation interface, as shown in the figure. 2. Click the "Next" button to enter the JDK custom installation interface, as shown in the figure. 3. It is recommended to choose to install directly to the default directory and click the "Next" button to install, as shown in the figure. You can also click the "Change" button to select the installation directory yourself. 4. After the installation is completed, the interface will pop up and click the "Close" button, as shown in the figure. The above is all the tutorials on how to install jdk brought by the editor. I hope it can be helpful to everyone.

See all articles