- 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
推薦閱讀
- Kubernetes修煉手冊
- Linux操作系統基礎
- Modern Web Testing with TestCafe
- Getting Started with oVirt 3.3
- Kali Linux滲透測試全流程詳解
- Persistence in PHP with the Doctrine ORM
- Mastering KVM Virtualization
- Ubuntu Linux操作系統
- Mastering Reactive JavaScript
- Windows 7應用入門與技巧
- 深入淺出Node.js
- Linux軟件管理平臺設計與實現
- 從實踐中學習Windows滲透測試
- 統信UOS應用開發進階教程
- iOS 10快速開發:18天零基礎開發一個商業應用