2011年6月24日 星期五

linux 安裝 Java

可以參考一下平台: Red Hat Linux, SUSE Linux 網站:http://www.java.com/zh_TW/download/help/linux_install.xml#selfextracting 

Ubuntu 適用之 Java   https://help.ubuntu.com/community/Java

這裡有詳細的安裝步驟

或者到Oracle下載安裝的資料

http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u26-download-400750.html

我的是使用ubuntu linux 所以要到https://help.ubuntu.com/community/Java下載
會在ubuntu software center 會安裝或upgrade
因為第一次玩Java 所以全部都安裝
This plugin works with the main browsers: Firefox, Chromium, Google Chrome, Epiphany.
On Konqueror, go to Settings → Configure Konqueror... and from menu select Java & JavaScript, then tick Enable Java globally option.

SDK (Software Development Kit)

  • Install the openjdk-6-jdk package using any installation method.

Sun Java

Since Ubuntu 10.04 (lucid) Sun Java is not available in any of the Ubuntu repository components. So, to install it you have to add a repository (e.g. a PPA) which includes the appropriate packages to your software sources.

Installation of Java Runtime Environment and its browser plugin

Open the terminal and run the following commands
sudo add-apt-repository ppa:sun-java-community-team/sun-java6

sudo apt-get update

sudo apt-get install sun-java6-bin sun-java6-plugin
Kubuntu Users may have a problem if they try to install with Kpackagekit. (it may be impossible agree the licence). To complete the installation, please use apt-get.
The browser plugin works with the main browsers:: Firefox, Chromium, Google Chrome, Epiphany. A control panel is also present in System → Preference → Sun Java 6 Plugin Control Panel.

SDK (Software Development Kit)

Open the terminal and run the following commands
sudo add-apt-repository ppa:sun-java-community-team/sun-java6

sudo apt-get update

sudo apt-get install sun-java6-jdk
At the end of the installation process the application will be present in Application → Programming → Sun Java 6 VisualVM.

Choosing the default Java to use

If your system has more than one version of Java, type the following command in a terminal window:
sudo update-alternatives --config java
to choose the version that you want to use.

GNU Compiler for Java

Install the java-gcj-compat-headless package using any installation method.
To install the development environment, install the java-gcj-compat-dev package using any installation method.
GCJ is a front end to the GCC compiler which can natively compile both Java(tm) source and bytecode files. The compiler can also generate class files. Gcjwebplugin is a little web browser plugin to execute Java applets.
It is targeted for Mozilla and compatible browsers that support the NPAPI. Others include the Eclipse Java Compiler, which is maintained by the Eclipse Foundation. Eclipse is an open-source Integrated development environment (IDE) written primarily in Java. The Eclipse open source community has over 60 open source projects. OpenJDK is the open source Java, derived from sources which will become OpenJDK 7 in the future.


上面有提到一個重點, 在ubuntu的terminal  去執行指令

沒有留言:

張貼留言