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

推荐订阅源

V
Visual Studio Blog
C
Cisco Blogs
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Scott Helme
Scott Helme
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
M
MIT News - Artificial intelligence
L
LINUX DO - 热门话题
I
InfoQ
GbyAI
GbyAI
NISL@THU
NISL@THU
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Engineering at Meta
Engineering at Meta
H
Hackread – Cybersecurity News, Data Breaches, AI and More
TaoSecurity Blog
TaoSecurity Blog
Simon Willison's Weblog
Simon Willison's Weblog
A
About on SuperTechFans
Spread Privacy
Spread Privacy
月光博客
月光博客
W
WeLiveSecurity
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
有赞技术团队
有赞技术团队
Security Latest
Security Latest
人人都是产品经理
人人都是产品经理
PCI Perspectives
PCI Perspectives
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
T
Troy Hunt's Blog
Martin Fowler
Martin Fowler
The Hacker News
The Hacker News
T
Tor Project blog
C
CERT Recently Published Vulnerability Notes
Apple Machine Learning Research
Apple Machine Learning Research
Stack Overflow Blog
Stack Overflow Blog
K
Kaspersky official blog
Cloudbric
Cloudbric
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tailwind CSS Blog
D
DataBreaches.Net
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Tenable Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - Franky
L
LINUX DO - 最新话题
MyScale Blog
MyScale Blog

博客园 - 海盗

How to point your package manager to US server [Linux]Variable and Parameters in Bash - 海盗 HOWTO: Install chinese input One series article of Linux file system Reading notes of &lt;&gt; -- I <> - 海盗 - 博客园 Got two days' break New keyboard - 海盗 - 博客园 Some questions before learning ASP.net MVC framework Back again! JavaScript MD5 Encryption - 海盗 AJAX中的Back Button/Bookmarking问题和Nikhil Kothari的Atlas解决方案 My 50 favorite design resources 复杂域环境下通过.Net操作Active Directory经验点滴 IE ToolBar 关于C#中字段的初始化 关于namespace - 海盗 - 博客园 好久没来了! C#播放音乐
How to install Java in Ubuntu
海盗 · 2008-11-01 · via 博客园 - 海盗

I currently have both Java 5 and Java 6 installed on my machine and it’s very easy to switch between the two. Java 6 has some nice goodies such as JSR-223 and better jconsole that I like to use.

For Java 5:

sudo apt-get install sun-java5-jre sun-java5-jdk

For Java 6:

sudo apt-get install sun-java6-jre sun-java6-jdk

There are other packages that you might be interested in:

  • sun-java6-demo
  • sun-java6-doc
  • sun-java6-source

Verify that you have the correct version of java running:

java -version

To see a list of the java versions that you have installed, you can use the following command (it’s a letter L at the end of the command):

update-java-alternatives -l

This should show you a list of all the java alternatives you have installed. java-gcj is the free version of Java from the GNU project and comes installed by default with Ubuntu so you should see it. To switch to a different version, use the following command:

sudo update-java-alternatives -s <version-desired>

e.g:

sudo update-java-alternatives -s java-1.5.0-sun