JDK Documentation |
For system requirements, see Solaris system requirements.
Installing the 64-bit JDK for the Solaris operating system on SPARC, x64, and EM64T platforms is a two-step process. These steps can be performed in either order, but you must install both sets of bundles for a given platform:
On SPARC processors: Install solaris-sparc (32-bit) with solaris-sparcv9 (64-bit)
On x64/EM64T processors: Install solaris-i586 (32-bit) with solaris-x64 (64-bit)
As with the installation of the 32-bit JDK, the 64-bit supplemental support is available in two installation formats; use the same installation format as you used for the installation of the 32-bit JDK.
Note: For any text on this page containing the following notation, you must substitute the appropriate JDK update version number (such as "_01") for the notation.
For example, if you are installing update 1.6.0_01, the following command:
would become:chmod +x jdk-6
-solaris-sparcv9.sh chmod +x jdk-6_01-solaris-sparcv9.sh
Note: The
jre-1_6_0
installer provides support for all processors that support the AMD 64-bit extensions to the Intel x86 architecture, including EM64T.-solaris-x64.sh
Follow these instructions to add 64-bit support to the JDK which has already been installed using the self-extracting binary. If you want to install Solaris packages comprising the JDK, seeInstallation of Solaris Packages.
1. Download the self-extracting binary and check the file size to ensure that you have downloaded the full, uncorrupted software bundle.
You can download to any directory you choose; it does not have to be the directory where you want to install the JDK.Before you download the file, notice its byte size provided on the download page on the web site. Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.
2. Make sure that execute permissions are set on the self-extracting binary:
On SPARC processors:
chmod +x jdk-6-solaris-sparcv9.sh On x64/EM64T processors:
chmod +x jdk-6-solaris-x64.sh 3. Change directory to the same directory from where you ran the self-extracting binary for the 32-bit install.
This is the directory that contains the jdk1.6.04. Run the self-extracting binary.directory of the 32-bit JRE. The next step installs the JDK into the current directory. Execute the downloaded file, prepending the path to it. For example, if the downloaded file is in the current directory, prepend it with " ./" (necessary if " ." is not in the PATH environment variable):On SPARC processors:
./jdk-6-solaris-sparcv9.sh On x64/EM64T processors:
./jdk-6-solaris-x64.sh The binary code license is displayed, and you are prompted to agree to its terms.
The supplemental files for 64-bit support are installed in directories named for the machine architecture model, which are added at several locations within the samejdk1.6.0
directory where the 32-bit JDK was installed. For example, on SPARC processors the 64-bit Java VM Library file (libjvm.so) is stored in thejre/lib/sparcv9/server, whereas the version for x64/EM64T is stored injre/lib/x64/server.
Use these instructions if you want to use the pkgadd utility to install 64-bit support for the JDK.
1. Download and check the file size to ensure that you have downloaded the full, uncorrupted software bundle.
It's best to create a new directory to save the download bundle to, as the next step will extract several directories and files into this directory. The directory can be anywhere you choose.Before you download the file, notice its byte size provided on the download page on the web site. Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.
2. Extract the contents of the compressed tar file:
On SPARC processors:
zcat jdk-6-solaris-sparcv9.tar.Z | tar -xf - On x64/EM64T processors:
zcat jdk-6-solaris-x64.tar.Z | tar -xf - This creates several directories ( SUNWj6rtx, SUNWj6dvx, andSUNWj6dmx) in the current directory, which contain 64-bit support for the JDK.
3. Become root by running su and entering the super-user password.
4. Uninstall any earlier installation of 64-bit packages for this version of the JDK.
If your machine has an earlier 64-bit version of the JDK installed in the default location (/usr/jdk/jdk1.6.0), you must remove it before installing a later 64-bit version at that location.You can skip this step if you intend to install the 64-bit version of the JDK in a non-default location. For more details, seeSelecting the Default Java Platform.
To uninstall the Solaris packages for the JDK, remove them by running:
On all processors:
pkgrm SUNWj6rtx SUNWj6dvx SUNWj6dmx5. Run the pkgadd command to install the packages.
On all processors:
pkgadd -d . SUNWj6rtx SUNWj6dvx SUNWj6dmxThis command installs the files for 64-bit support into the JDK installation at/usr/jdk/jdk1.6.0.
6. Delete the tar files and extracted SUNW* directories.
7. Exit the root shell. No need to reboot.
Solaris Operating System Installation (32-bit)
JDK Documentation Contents
System Requirements
JDK Installation Instructions
Installation of Solaris Packages
Installation of Self-Extracting Binary
Java Plugin Browser Registration Instructions
Java Web Start Installation Notes
General Installation Notes
Solaris Package Install - Selecting the Default Java Platform
Location of Java VM Library Files (libjvm.so)
System Requirements
This version of the JDK is supported on the Solaris 8, Solaris 9, Solaris 10, and Solaris 11 operating systems. For supported processors, desktop managers, and browsers, seeSystem Configurations.
Prior to installing the JDK, you should ensure that you have installed the full set of required patches needed for support of this release. SeeMy Oracle Support website for recommended and required patches.
See also Solaris Font Package Requirements for information about which font packages should be on your system.
JDK Installation Instructions
Installing the JDK automatically installs the Java Plugin and Java Web Start. Note that the Java Plugin needs to be registered with the browser. Instructions for doing so can be found below atJava Plugin Browser Registration Instructions.
To install the 32-bit JDK, follow the installation instructions below.
To install the 64-bit JDK on a SPARC, x64, or EM64T platform, you must follow a two-step procedure: Install the 32-bit JDK using the installation instructions below, and also install the supplemental support for 64-bit operation by following the64-bit Installation Instructions.
Install formats - The JDK is available in two installation formats.
- Solaris Packages - A
.tar.Z
file containing Solaris SUNW* packages to be installed with the pkgadd utility. If you are using this bundle, seeInstallation of Solaris Packages below.
- Self-extracting Binary File - This file can be used to install the JDK in a location chosen by the user. This file can be installed by anyone (not only root users), and it can be installed in any location. It will not displace the system version of the Java platform suppled by the Solaris Operating System (unless you intentially install it in the same location as the system's Java platform, which requires you to be root user). If you are using this file, seeInstallation of Self-Extracting Binary below.
Note: For any text on this page containing the following notation, you must substitute the appropriate JDK update version number (such as "_01") for the notation.
For example, if you are installing update 1.6.0_01, the following command:
would become:chmod +x jdk-6
-solaris-sparc.sh chmod +x jdk-6u1-solaris-sparc.sh
Installation of Solaris Packages
Use these instructions to install the Java packages for Solaris. This is the recommended method for installing Java on Solaris as it allows all users on your system to access Java. If you are a tool developer and need to distribute Java with your product or if you do not have root access to your Solaris system, you can use the self-extracting bundle to install a private copy of the JDK.
1. Download and check the file size to ensure that you have downloaded the full, uncorrupted software bundle.
It's best to create a new directory to save the download bundle to, as the next step will extract several directories and files into this directory. The directory can be anywhere you choose.
Before you download the file, notice its byte size provided on the download page on the web site. Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.
2. Extract the contents of the compressed tar file:
On SPARC processors:
zcat jdk-6
-solaris-sparc.tar.Z | tar -xf - On x86/x64/EM64T processors:
zcat jdk-6
-solaris-i586.tar.Z | tar -xf - This creates several directories (
SUNWj6rt
,SUNWj6dev
,SUNWj6cfg
,SUNWj6man
,SUNWj6dmo
, andSUNWj6jmp
) plus a few files in the current directory.3. Become root by running
su
and entering the super-user password.4. Uninstall any earlier installation of JDK packages.
If your machine has an earlier installation of this version of the JDK in the default location (
/usr/jdk/jdk1.6.0
), you must remove it before installing this version at the same location.You can skip this step if you intend to install the JDK in a non-default location. For more details, seeSelecting the Default Java Platform.
To uninstall the Solaris packages for this version of the JDK, remove them by running:
On all processors:
pkgrm SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo
5. Run the pkgadd command to install the packages.
On all processors:
pkgadd -d . SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo
This command installs the JDK into
/usr/jdk/jdk1.6.0
. This version doesnot automatically become the default Java platform on Solaris 9 or earlier (unless there was no default), but does become the default on Solaris 10. If you want 6.0 to be the default on Solaris 8 or 9, follow the instructions atDefault Installations of Java Platform.See the
pkgadd(1)
andadmin(4)
man pages for information on installing the JDK in a non-default location.
6. For Japanese users: Install man pages.
If your machine has an earlier version of the Japanese man pages already installed in/usr/jdk/jdk1.6.0
, you must remove that package before installing this version of the Japanese man pages at that location. Remove that package by running:On all processors:
pkgrm SUNWj6jmp
Then run the pkgadd command to install the new Japanese man page package:
On all processors:
pkgadd -d . SUNWj6jmp
7. Delete the tar files and extracted SUNW* directories.
8. Exit the root shell. No need to reboot.
Installation of Self-Extracting Binary
Use these instructions if you want to use the self-extracting binary file to install the JDK. If you want to install Solaris packages comprising the JDK, use Installation of Solaris Packages.1. Download the self-extracting binary and ensure that you have downloaded the full, uncorrupted software bundle.
You can download to any directory you choose; it does not have to be the directory where you want to install the JDK.Before you download the file, notice its byte size provided on the download page on the web site. Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.
2. Make sure that execute permissions are set on the self-extracting binary:
On SPARC processors:
chmod +x jdk-6
-solaris-sparc.sh On x86/x64/EM64T processors:
chmod +x jdk-6
-solaris-i586.sh 3. Change directory to the location where you would like the files to be installed.
The next step installs the JDK into the current directory.4. Run the self-extracting binary.Execute the downloaded file with the path prepended to it. For example, if the file is in the current directory, prepend it with "./
" (necessary if ".
" is not in the PATH environment variable):On SPARC processors:
./jdk-6
-solaris-sparc.sh On x86/x64/EM64T processors:
./jdk-6
-solaris-i586.sh The binary code license is displayed, and you are prompted to agree to its terms.
The JDK files are installed in a directory called
jdk1.6.0
in the current directory. Follow this link to see itsdirectory structure. The JDK documentation is a separate download.Note about System Preferences - When run by a non-root user, the installation is considered a "private" or non-system install. During a private install, the installation script configures Java such that the backing store for the
java.util.prefs
package is created inside the JRE's installation directory. If the JRE is installed this way on a network-mounted drive, all Java applications, libraries, and preferences can be exported for sharing, so that the same version of the Java runtime environment and preferences are available to other machines.As an alternative, when root users run the installation script, preferences are stored in the
/etc
directory. This is similar to installing the Java packages for Solaris, and this installation is "public" or system specific. Installing Java in this manner allows all versions of Java that support thejava.util.prefs
package to share the same set of preferences. In other words, in a public/system install, preferences set by a user running the JRE are available when the system is upgraded.See the Preferences API documentation for more information about preferences in the Java platform.
Java Plugin Browser Registration Instructions
You must register the Java Plugin component with Netscape or Mozilla for the Plugin to work. Instructions to do this can be found at Manual Java Plugin Registration for Solaris.Java Plugin is supported for Netscape 7.x, plus Mozilla 1.x and higher on Solaris 8, 9, and 10. Java Plugin also supports Netscape 4.x, but only on Solaris 8. Java Plugin no longer works with Netscape 6.x. Java Plugin may work with other non-supported browsers. If you are using a non-supported browser, check your browser documentation for details on registering the Java Plugin.
Also see documentation on the Java Plugin component.
Java Web Start Installation Notes
This JDK release includes Java Web Start; Java Web Start is automatically installed with the JDK. But note the following:
- Compatibility: The release of Java Web Start that comes with this JDK/JRE can be run on SDK/JRE 1.2.2 or later. It will not work with SDK/JRE 1.1.x or earlier.
- Upgrading from Previous Versions: This new release will overwrite previous installations and automatically update browsers to use this new release. The configuration files and program files folder used by Java Web Start have changed, but all your settings will remain intact after the upgrade, since Java Web Start will translate your settings to the new form.
- Using Java Web Start with Netscape 6.x/7.x: For Netscape 6.x/7.x users, setup the Java Web Start MIME type (JNLP) in the Edit->Preferences->Navigator->Helper Applications section. The file extension is
jnlp
; MIME Type isapplication/x-java-jnlp-file
. It should be handled by thejavaws
executable file in your Java Web Start directory. Also note that, due to a problem with the JavaScript in Netscape 6.x/7.x, you must use the non-JavaScript version of the demos page.pkgadd
utility use: (1) If you use thepkgadd
utility to install the Solaris packages for JDK or JRE, a symbolic link for/j2se/jre/javaws/javaws
is created in/usr/bin
. (2) If you have a previous release of Java Web Start installed and you want the latest version to run instead, edit the$HOME/.mailcap
file so that it is identical to/etc/.mailcap
. If you want the older version of Java Web Start to run, do not edit$HOME/.mailcap.
General Installation Notes
The following are general notes about the installation.
Solaris Package Install - Selecting the Default Java Platform
This note describes how the default Java platform is selected when running the Solaris package installation (not the self-extracting binary) of the JDK. It also describes how to change that default.The Default Java Platform - Several versions of the Java platform can be present simultaneously on a Solaris system (using the default Solaris package installations), but only one can be the "default" Java platform. The default Java platform is defined by the directory that the
/usr/java
symbolic link points to. To determine the default version of java, run:/usr/java/bin/java -fullversion
The
/usr/java
symbolic link can change the default Java platform because there are symbolic links in/usr/bin
(also known as/bin
) that use it. (For example, the/usr/bin/java
link refers to/usr/java/bin/java
, which is the Java 2 Runtime Environment). Many Java applications are compatible with later versions of the Java platform, but some applications might be less compatible.Default Installations of Java Platform - When the Solaris Operating System is installed, the
/usr/java
symbolic link initially points to the directory shown in the second column of the table below.
Solaris Version /usr/java Link
Originally Points to DirectoryWhich Can Hold
Java PlatformDefault Platform
After InstallationSolaris 8 /usr/java1.2
1.2.2 1.2.2 (unchanged) * Solaris 9 /usr/j2se
1.3.1, 1.4.0, 1.4.1or 1.4.2 1.3.1, 1.4.0, 1.4.1 or 1.4.2 (unchanged) * Solaris 10 /usr/jdk/jdk1.5
5.0 or 6 5.0 or 6 * The only way that this version of the JDK will make itself the default on Solaris 9 or earlier is if no other default exists.
For example, on Solaris 8, the
/usr/java
symbolic link originally points to directory/usr/java1.2
which holds version 1.2.2. On Solaris 9, the/usr/java
symbolic link originally points to directory/usr/j2se
, which can hold any one of versions 1.3.1, 1.4.0, 1.4.1 or 1.4.2, depending on the latest Java version you have installed. On Solaris 10, the/usr/java
symbolic link originally points to directory/usr/jdk/jdk1.5.0
.Note that installing this version of the JDK on Solaris 8 or 9 will normally not alter the default Java platform. This version will become the default only if no other default exists. For example, if
/usr/java
does not point to a version of Java, installing this version of the JDK will make/usr/java
point to/usr/jdk/jdk1.6.0
.Making this version of the JDK the default - On Solaris 8 and 9, it is possible for root users to make this version of the JDK the default Java platform by modifying the
/usr/java
symbolic link to point to/usr/jdk/jdk1.6.0
. On Solaris 9, a root user would modify the/usr/j2se
symbolic link to point to the same directory. However, changing the symbolic link in this manner may cause problems for some earlier Java applications that have not been tested with this version. For information about incompatibilities between this version of the JDK and earlier releases, seeCompatibility with Previous Releases.PATH Setting - The default Java is linked through
/usr/bin
, such as/usr/bin/java
. If this is in the path before another version of Java is in the path, then that will be the version of Java run from the command line or from any other tool that uses the PATH environment variable to locate Java.
Location of Java VM Library Files (
libjvm.so
)If you use the Invocation API to launch an application directly rather than using the Java application launcher, be sure to use the correct paths to invoke the Java HotSpot Client Virtual Machine (VM) or Java HotSpot Server VM, as desired. The path within the JDK to the Java HotSpot Client VM is:The path to the Java HotSpot Server VM is:jre/lib/sparc/client/libjvm.so
(on SPARC)
jre/lib/i386/client/libjvm.so
(on x86)jre/lib/sparc/server/libjvm.so
(on SPARC)
jre/lib/sparcv9/server/libjvm.so
(on SPARC 64-bit)
jre/lib/i386/server/libjvm.so
(on x86)
jre/lib/x64/server/libjvm.so
(on x64/EM64T)Corresponding locations in the Java Runtime Environment begin with
jre1.6.0
rather thanjre
.Note, the Exact VM and Classic VM are no longer part of the JDK, and existing code that uses the Invocation API to launch an application based on old paths to the Exact or Classic VMs will not work.
中文版安装说明:
为 Solaris(64 位)下载和安装 Java Runtime Environment (JRE) 的说明
本文适用于:
- 平台: Solaris SPARC
- 浏览器: Mozilla 1.4+
- Java 版本: 1.5.0, 6.0
注:另请通过以下网址进行验证: http://java.sun.com/javase/6/webnotes/install/system-configurations.html
前提条件:
安装 J2SE Runtime Environment 之前,请确保:
- 已安装了支持此版本的所有必需修补程序。有关建议的修补程序和必需的修补程序,请从 SunSolve Web 站点下载:
适用于 Solaris 的 J2SE 群集修补程序- 检查以下位置的 Solaris 字体软件包要求: JRE 5.0 字体软件包要求
- 在 SPARC、x64 和 EM64T 平台上为 Solaris 操作系统安装 64 位 JDK 分为两个步骤。以下步骤可按任意顺序执行,但必须同时安装下列捆绑软件包:
安装 solaris-i586(32 位)和 solaris-amd64(64 位)- 安装 solaris-sparc(32 位)和 solaris-sparcv9(64 位)
- 按照 32 位 JDK 安装说明 安装 32 位 JDK。
- 按照以下 64 位安装说明 安装 64 位支持补充文件。
安装说明
按照以下说明为 J2SE Runtime Environment (JRE) 安装 64 位补充文件。下载文件为自解压二进制文件。
注:对于此页面中包含以下符号的所有文本,必须用正确的 JRE 更新版本号替换该符号:
例如,如果您安装 Java 6 update 2,则以下命令:
chmod +x jre-1_6_0_-solaris-sparcv9.sh
应改为:
chmod +x jre-1_6_0_02-solaris-sparcv9.sh
注:jre-1_6_0-solaris-amd64.sh 安装程序用于为所有允许 x64 位扩展至 Intel x86 体系结构(包括 EM64T)的处理器提供支持。
- 下载自解压二进制文件并检查文件的大小,确保下载了完整无缺的软件包。
文件可下载至任何所需的目录;而不必是安装 JRE 的目录。- 下载文件之前,注意 Web 站点下载页面上提供的文件大小。下载完毕后,比较所下载文件的大小以及页面上提供的文件大小,确保二者相同。
- 确保在自解压二进制文件上设置了执行权限:
在 SPARC 处理器上:chmod +x jre-1_6_0-solaris-sparcv9.sh 在 x64/EM64T 处理器上:chmod +x jre-1_6_0-solaris-amd64.sh - 切换到您以前在进行 32 位安装时从中运行自解压二进制文件的同一目录。
该目录包含 32 位 JRE 的 jre1.6.0_目录。下一步将 JRE 安装在当前目录中。 - 运行自解压二进制文件。
执行所下载的文件(在文件的前面加上路径)。例如,如果所下载的文件处于当前目录中,则加上 "./ "
在 SPARC 处理器上:./jre-1_6_0-solaris-sparcv9.sh 在 AMD64/EM64T 处理器上:./jre-1_6_0-solaris-amd64.sh
二进制代码许可证将会出现,并提示您同意其中的条款。用于支持 64 位操作的文件将会安装在同一 jre-6u2_目录(即 32 位 JRE 所在的目录)中的数个不同位置。
本文来源于:http://www.oracle.com/technetwork/java/javase/install-solaris-139361.html
http://www.oracle.com/technetwork/java/javase/install-solaris-64-138849.html
http://www.java.com/zh_CN/download/help/solaris_64bit_install.xml
记录下来方便以后使用。
jdk完成之后,在etc/profile下添加以下信息
export JAVA_HOME=/export/home/jdk1.6.0_30
export CATAINA_HOME=/export/home/tomcat/tomcat6
export CALSSPATH=/export/home/jdk1.6.0_30/lib:/export/home/jdk1.6.0_30/jre/lib:.
export PATH=$PATH:/export/home/jdk1.6.0_30:/export/home/jdk1.6.0_30/jre/bin