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!

尽管每隔一段时间就会出现大量应用程序,但 Java 仍然是迄今为止最常用和最重要的编程语言之一。许多应用程序依赖于 Windows 操作系统上的 Java,更新它意味着通过为 Java 应用程序提供安全运行的稳定性和安全性来提高性能。您还可以在 Linux 和 macOS 平台上安装 Java。唯一的区别是每个平台的包/文件。现在,有了 Windows 11,是时候下载 Java,在今天的文章中,我们将带您完成在您的设备上安装它的简单步骤。我应该下载哪个版本的 Java?您下载的 Java 版本

1、说明Java中提供了一个动态代理类Proxy,Proxy并不是我们所说的代理对象的类,而是提供了一个创建代理对象的静态方法(newProxyInstance)来获取代理对象。2、实例publicclassHelloWorld{publicstaticvoidmain(String[]args){//获取代理对象ProxyFactoryfactory=newProxyFactory();SellTicketsproxyObject=factory.getProxyObject();proxyO

oracle数据库需要jdk,其原因是:1、当使用特定的软件或功能时需要包含在JDK中的其他软件或库;2、需要安装Java JDK才能在Oracle数据库中运行Java程序;3、JDK提供了开发和编译Java应用程序的功能;4、满足Oracle对Java函数的要求,以帮助实现和实现特定功能。

深度Linux系统是一款基于Linux内核的国产操作系统,具有稳定、安全、易用等特点,在深度Linux系统中,安装JDK(JavaDevelopmentKit)是开发Java应用程序的必要步骤,本文将详细介绍如何在深度Linux系统中安装JDK。安装步骤打开深度Linux系统的终端。使用命令行下载JDK安装包,命令如下:```shellsudoapt-getinstallopenjdk-11-jdk```等待下载完成后,系统会自动安装JDK。验证JDK是否安装成功,输入以下命令:```javaj

linux jdk目录在bin目录下,具体查找方法是:1、通过“whereis java”命令找到javad的执行目录;2、通过执行文件找到链接文件;3、通过“ls -lrt /etc/alternatives/java”命令找到安装目录即可。

Go和Scala在语言特性上的差异在于:类型系统:Go采用静态类型系统,而Scala采用混合类型系统。并发性:Go基于轻量级goroutine,而Scala使用基于Akka的actor模型。泛型:Go提供实验性的泛型特性,而Scala具有成熟的泛型系统。函数式编程:Scala受函数式编程影响,支持模式匹配和高阶函数,而Go仅支持部分函数式编程概念。生态系统:Go生态系统庞大,而Scala相对较小。

近期有很多小伙伴咨询小编jdk怎么安装,接下来就让我们一起学习一下jdk怎么安装的全部内容吧,希望可以帮助到大家。1、首先下载JDK安装文件,进入JDK安装界面,如图所示。2、单击“下一步”按钮,进入JDK自定义安装界面,如图所示。3、建议选择直接安装到默认目录,单击“下一步”按钮即可进行安装,如图所示。也可以单击“更改”按钮,自行选择安装目录。4、安装完毕后,弹出界面,单击“关闭”按钮即可,如图所示。上面就是小编为大家带来的jdk怎么安装的全部教程,希望对大家能够有所帮助哦。

如下操作步骤为linux系统中部署jdk环境1.下载jdk安装包2.新建安装jdk文件夹(/usr/local/java/jdk)cd/usr/localmkdir/usr/local/javalocal目录下新建java目录cd/usr/local/javamkdir/usr/local/java/jdk新建jdk目录cd/usr/local/java/jdk3.上传jdk安装包到linux4.解压jdk安装包解压格式:tarzxvf压缩包名称后面的名称可以只输入一个首字母,然后使用Tab按键


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

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

SublimeText3 Linux new version
SublimeText3 Linux latest version

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!
