Guide to installing Scala and Sun JDK on CentOS7.0
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
2. Uninstall related openjdk
[root@mycentos01 bin]#rpm -e --nodeps java-openjdk-headle.x86_64
3. Install jdk under your own sun official website
[root@mycentos01 bin]# tar -zxvf jdk-8u121-linux-x64.tar.gz
4. Install the Scala you downloaded
[root@mycentos01 bin]# tar -xzvf scala-2.10.6.tgz
5. Configure your own environment variables
[root@mycentos01 bin]# vim /etc/profile
6. Refresh the configuration file to make the configuration take effect
[root@mycentos01 bin]# source /etc/profile
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



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

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.

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 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

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.

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.

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

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.
