惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
小众软件
小众软件
S
Schneier on Security
S
Securelist
P
Proofpoint News Feed
D
DataBreaches.Net
博客园_首页
S
Security Affairs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - Franky
C
Check Point Blog
GbyAI
GbyAI
H
Help Net Security
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
博客园 - 叶小钗
WordPress大学
WordPress大学
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
The Exploit Database - CXSecurity.com
L
LINUX DO - 热门话题
C
Cybersecurity and Infrastructure Security Agency CISA
SecWiki News
SecWiki News
T
Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tenable Blog
H
Hacker News: Front Page
宝玉的分享
宝玉的分享
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CERT Recently Published Vulnerability Notes
Google Online Security Blog
Google Online Security Blog
P
Privacy & Cybersecurity Law Blog
N
News | PayPal Newsroom
M
MIT News - Artificial intelligence
P
Privacy International News Feed
博客园 - 三生石上(FineUI控件)
美团技术团队
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
Last Week in AI
Last Week in AI
Spread Privacy
Spread Privacy
酷 壳 – CoolShell
酷 壳 – CoolShell
IT之家
IT之家
Cyberwarzone
Cyberwarzone
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
Engineering at Meta
Engineering at Meta

博客园 - hai

会移动的文字(Marquee)学习 How To Share The Internet Connection Between Mac and PC Mac OSX 下配置 Google Android 开发环境 Mac OSX Eclipse3.6下安装erlide搭建erlang集成开发环境 Installing Erlang on Mac OS X 浏览器解析 XML DOM code sign error doesn't match any valid certificate private key pair in the default keych 错误的解决办法 CSS的跨浏览器代码准则 Google Maps API详解--02 Google Earth API 讲解--02 Google Maps API 详解--01 Network Programming Using Properties And Synthesize In Objective-C 2.0 For Getters And Setters Tutorial: Networking and Bonjour on iPhone 5个必看的cocos2d 开源游戏 有机会都学习下 iPhone开发技巧之工具篇(1)— 将XIB文件转换为Objective-C源程序 Google Earth API 讲解--04 Google Earth API 讲解--05 浏览器获取地理位置
How to set the JAVA_HOME variable in Mac OS X – Snow Leopard
hai · 2010-08-05 · via 博客园 - hai

Recently I had to setup a Java app on my Mac, which was running from the Terminal, and needed the JAVA_HOME variable set.

Here’s what had to be done:

- Start the Terminal app.
- Create/Edit ~/.bash_profile file.
Note: I first tried creating and using the ~/.bashrc file, but that didn’t work (Mac OS 10.6.2), while ~/.bash_profile worked as expected.

Therefore,

$ vi ~/.bash_profile

… and paste the following (make it a single line):

export JAVA_HOME=/System/Library/Frameworks/
JavaVM.framework/Versions/CurrentJDK/Home

… save and exit vi.

Restart Terminal app just to be sure that it worked, and try accessing it by typing:

$ echo $JAVA_HOME

If you see the correct JAVA path, then it is all done!

我的电脑显示如下:

macbookpro:bin shang$ echo $JAVA_HOME

/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home