- Learning Continuous Integration with Jenkins(Second Edition)
- Nikhil Pathania
- 151字
- 2021-07-02 21:18:37
Installing Java
Follow these steps to install Java:
- Update the package index using following command:
sudo apt-get update
- Next, install Java. The following command will install the JRE:
sudo apt-get install default-jre
- To set the JAVA_HOME environment variable, first 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
推薦閱讀
- pcDuino開發實戰
- SharePoint 2013 WCM Advanced Cookbook
- Mastering KVM Virtualization
- Implementing Azure DevOps Solutions
- Linux操作系統應用編程
- Windows Phone應用程序開發
- Windows Vista融會貫通
- Linux系統安全基礎:二進制代碼安全性分析基礎與實踐
- 注冊表應用完全DIY
- INSTANT Migration from Windows Server 2008 and 2008 R2 to 2012 How-to
- 深入淺出Node.js
- 從實踐中學習Windows滲透測試
- Linux內核API完全參考手冊(第2版)
- Android應用性能優化最佳實踐
- Raspberry Pi入門指南