search
HomeOperation and MaintenanceMac OSHow to configure java environment variables under macos system
How to configure java environment variables under macos systemNov 26, 2020 pm 03:27 PM
javamacosenvironment variables

How to configure java environment variables under macos system

The specific configuration steps are as follows:

1. Edit bash_profile

vim ~/.bash_profile
输入以下内容并保存

export JAVA_HOME=`/usr/libexec/java_home`
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME 
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin

2. Make the environment variables effective

source ~/.bash_profile

3. Verify

tianshl@tianshl ~ $ echo $PATH

4. Note

Before using fish, you must exit fish

/usr/libexec/java_home This command can output the path of JAVA_HOME

Related recommendations: macos

The above is the detailed content of How to configure java environment variables under macos system. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:csdn. If there is any infringement, please contact admin@php.cn delete
docker命令在哪里输入docker命令在哪里输入Apr 02, 2024 pm 10:09 PM

Docker 命令在终端窗口中输入,如 Linux 和 macOS 上的“终端”或 Windows 上的“命令提示符”。步骤包括:1. 打开终端窗口;2. 输入 Docker 命令(如 docker run);3. 按 Enter 执行命令。提示:可以使用 docker --help 获取帮助,某些命令需要 root 权限。

vscode怎么运行代码jsvscode怎么运行代码jsApr 03, 2024 am 01:51 AM

在 Visual Studio Code 中运行 JavaScript 代码有以下三种方法:运行选定代码块。使用调试器。使用命令行导航到脚本所在目录并运行 node filename.js。

macos是什么意思macos是什么意思Apr 02, 2024 pm 04:48 PM

macOS 是 Apple 专为 Mac 电脑设计的操作系统,由 Darwin、Aqua、Finder、Dock 等组件组成。它以其用户友好性、稳定性和强大的功能而著称,提供无缝集成和强大的安全功能,使其成为 Mac 用户的理想选择。

vscode是什么语言开发的vscode是什么语言开发的Apr 03, 2024 am 01:57 AM

VS Code 主要由以下语言开发:TypeScript:核心组件JavaScript:补充功能Electron:跨平台 GUIC++:性能相关功能支持多种其他语言(如 Python、Java、C#)

详解MAC中如何下载配置PHPMyAdmin详解MAC中如何下载配置PHPMyAdminFeb 01, 2023 am 11:01 AM

本篇文章给大家带来了关于PHPMyAdmin的相关知识,其中主要介绍了如何在MAC下配置PHPMyAdmin,下面一起来看一下,希望对大家有帮助。

为什么python下载后不见了为什么python下载后不见了Apr 02, 2024 pm 06:51 PM

Python 下载后消失可能是由于:1. 安装路径不正确;2. 未添加到环境变量;3. 未正式安装;4. 防病毒软件干扰;5. 文件损坏;6. 下载不完整。

访问网站出现nginx怎么解决访问网站出现nginx怎么解决Apr 02, 2024 pm 08:39 PM

访问网站出现 nginx,原因可能是:服务器维护、服务器繁忙、浏览器缓存、DNS 问题、防火墙阻止、网站错误配置、网络连接问题或网站已关闭。尝试以下解决方案:等待维护结束、非高峰时段访问、清除浏览器缓存、刷新 DNS 缓存、禁用防火墙或防病毒软件、联系网站管理员、检查网络连接或使用搜索引擎或 Web 存档查找其他网站副本。如果问题仍然存在,请与网站管理员联系。

vscode怎么设置中文编码格式vscode怎么设置中文编码格式Apr 03, 2024 am 02:57 AM

在 VS Code 中,通过设置“文件编码”为“UTF-8”,即可设置中文编码格式,确保中文字符的正确显示和处理,提升开发效率。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SecLists

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.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use