- Learning Continuous Integration with Jenkins(Second Edition)
- Nikhil Pathania
- 151字
- 2021-07-02 21:18:34
Installing Java
Follow these steps to install Java on Ubuntu:
- Update the package index:
sudo apt-get update
- Next, install Java. The following command will install the Java Runtime Environment (JRE):
sudo apt-get install default-jre
- To set the JAVA_HOME environment variable, get the Java installation location. Do this by executing the following command:
update-java-alternatives -l
- The previous command will print the list of Java applications installed on your machine along with their installation paths. Copy the Java path that appears on your Terminal:
java-1.8.0-openjdk-amd64 1081
/usr/lib/jvm/java-1.8.0-openjdk-amd64
- Open the /etc/environment file for editing using the following command:
sudo nano /etc/environment
- Add the Java path (the one that you copied earlier) inside the /etc/environment file in the following format:
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64"
- Type Ctrl + X and choose Y to save and close the file.
- Next, reload the file using the following command:
sudo source /etc/environment
推薦閱讀
- Containerization with LXC
- Getting Started with oVirt 3.3
- 鴻蒙生態:開啟萬物互聯的智慧新時代
- 無蘋果不生活 OS X Mountain Lion隨身寶典
- Instant Handlebars.js
- SharePoint 2013 WCM Advanced Cookbook
- 高性能Linux服務器構建實戰:運維監控、性能調優與集群應用
- 混沌工程:復雜系統韌性實現之道
- macOS效率手冊
- Microsoft Operations Management Suite Cookbook
- Ceph分布式存儲實戰
- Linux命令行大全(第2版)
- bash shell腳本編程經典實例(第2版)
- Office 365 User Guide
- Java EE 7 Developer Handbook