SeeJDK 7 and JRE 7 InstallationGuide for general information about installing JDK 7 and JRE 7.
For information on enhancements to JDK 7 that relate to the installer, seeInstaller Enhancements in JDK 7.
This version of the JDK is supported on the Oracle Solaris 10 Update 9 or later OS, Oracle Solaris 11 Express OS, and Oracle Solaris 11 OS. For supported processors and browsers, seeOracle JDK 7 and JRE 7 Certified System Configurations.
To install JDK 7 on Oracle Solaris 11, install thejdk-7 package:
Make sure thejdk-7 package is available from your IPS publisher.
$ pkg list -a jdk-7NAME (PUBLISHER) VERSION IFOdeveloper/java/jdk-7 1.7.0.0-0.173.0.0.0.0.0 ---
If you see an "i" in the I column, then the package is already installed.
This package is available from thesolaris publisher atpkg.oracle.com and also from other publisher origins. If you see a message that no such package is found, use thepkg publisher command to check your publisher origin and contact your system administrator or Oracle Support representative.
Make sure you have permission to install IPS packages.
Use the profiles command to list the rights profiles that are assigned to you. If you have the Software Installation rights profile, you can use thepfexec command to install and update packages.
$ pfexec pkg install jdk-7
Other rights profiles also provide installation privilege, such as System Administrator rights profile.
Depending on the security policy at your site, you might be able to use thesudo command with your user password to execute a privileged command.
$ sudo pkg install jdk-7
Use theroles command to list the roles that are assigned to you. If you have theroot role, you can use thesu command with the root password to assume the root role.
# pkg install jdk-7
The following table lists the options available for downloadingthe JDK 7 release on the Oracle Solaris platform. The link in the firstcolumn takes you to the instructions for that version.
| Download File(s) | Architecture | Who Can Install |
|---|---|---|
| jdk-7u<version>-solaris-sparc.tar.gz jdk-7u<version>-solaris-sparcv9.tar.gz | 64-bit SPARC | anyone |
| jdk-7u<version>-solaris-i586.tar.gz jdk-7u<version>-solaris-x64.tar.gz | 64-bit x64, EM64T | anyone |
| jdk-7u<version>-solaris-i586.tar.gz | 32-bit x64, EM64T | anyone |
| jdk-7u<version>-solaris-sparc.tar.Z jdk-7u<version>-solaris-sparcv9.tar.Z | 64-bit SPARC | root |
| jdk-7u<version>-solaris-i586.tar.Z jdk-7u<version>-solaris-x64.tar.Z | 64-bit x64, EM64T | root |
| jdk-7u<version>-solaris-i586.tar.Z | 32-bit x64, EM64T | root |
Manual installation can be performed using either of the following:
.tar.gz) allows you to install a private version of the JDK for the current user into any location, without affecting other JDK installations. However, it may involve manual steps to get some of the features to work (for example, the-version:release option of thejava command which allows you to specify the release to be used to run the specified class requires the correct path to the JDK release under /usr/jdk)..tar.Z) allows you to perform a system-wide installation of the JDK for all users, and requires root access. Note that this is a legacy install option with the recommended approach being the use of theIPS framework for installing the JDK.Note: For any text on this page containing the followingnotation, you must substitute the appropriate JDK update version numberfor the notation.
<version>
For example, if you are installing update JDK 7 update release 1,the following string representing the name of the bundle:
jdk-7u<version>-solaris-sparc.tar.gz
would become:
jdk-7u1-solaris-sparc.tar.gz
Note that, as in the preceding example,the<version> number is sometimespreceded with the letteru, for example,7u1,and sometimes it is preceded with an underscore, for example,jdk1.7.0_01.
.tar.gz)You can install a JDK archive binary in any location that youcan write to. It will not displace the system version of the Javaplatform provided by the Oracle Solaris OS. These instructions install aprivate version of the JDK.
Installing the JDK on a 64-bit system that allows a 32-bit JVMis a two-step process: first install the 32-bit JDK and theninstall the additional support for 64-bit operations. The filenames are as follows:
On SPARC processors:
jdk-7u<version>-solaris-sparc.tar.gz (32-bit) jdk-7u<version>-solaris-sparcv9.tar.gz (64-bit)
On x64/EM64T processors:
jdk-7u<version>-solaris-i586.tar.gz (32-bit) jdk-7u<version>-solaris-x64.tar.gz (64-bit)
If you are running a 32-bit version of Oracle Solaris, you only needto download and install the 32-bit version.
1. Download the bundles or bundle, if you areinstalling only the 32-bit version of Oracle Solaris. Before the file canbe downloaded, you must accept the license agreement. The archivebinaries can be installed by anyone in any location that you canwrite to.
The.tar.gz archive file (also called atarball) is a file that can be simultaneouslyuncompressed and extracted in one step.
2. Change directory to the location where youwould like the JDK to be installed. Move the.tar.gzarchive binaries to the current directory.
3. Unpack the tarball and install the JDK.
The following steps can be performed in either order.
On SPARC processors:
% gzip -dc jdk-7u<version>-solaris-sparc.tar.gz | tar xf - % gzip -dc jdk-7u<version>-solaris-sparcv9.tar.gz | tar xf -
On x64/EM64T processors:
% gzip -dc jdk-7u<version>-solaris-i586.tar.gz | tar xf - % gzip -dc jdk-7u<version>-solaris-x64.tar.gz | tar xf -
The JDK is installed in a directory calledjdk1.7.0_<version> in the current directory.For example, for the JDK 7 update 1 release, the directory would benamed:jdk1.7.0_01.
The supplemental files for 64-bit support are installed indirectories named for the machine architecture model, which areadded at several locations within the samejdk1.7.0_<version> directory where the32-bit JDK was installed.For example, on SPARC processors the 64-bit Java VM Library file(libjvm.so) is stored in thejdk1.7.0_<version>/jre/lib/sparcv9/serverdirectory, whereas the version for x64/EM64T is stored in thejdk1.7.0_<version>/jre/lib/amd64/server directory.
The JDK documentation is a separate download. SeeJava SE Downloads for more information.
.tar.Z)Use these instructions if you want to use thepkgadd utility to install the JDK. This version allowsall users on your system to access Java.
If you do not have root access to your Oracle Solaris system, you canuse theOracle Solaris.tar.gzarchive binaries to install a private copy of the JDK.
Installing the JDK on a 64-bit system that allows a 32-bit JVMis a two-step process: first install the 32-bit JDK and theninstall the additional support for 64-bit operations. The filenames are as follows:
On SPARC processors:
jdk-7u<version>-solaris-sparc.tar.Z (32-bit) jdk-7u<version>-solaris-sparcv9.tar.Z (64-bit)
On x64/EM64T processors:
jdk-7u<version>-solaris-i586.tar.Z (32-bit) jdk-7u<version>-solaris-x64.tar.Z (64-bit)
If you are installing a 32-bit version of Oracle Solaris, you only needto download and install the 32-bit version.
1. Download the bundles or bundle, if you areinstalling only the 32-bit version of Oracle Solaris. Before the file canbe downloaded, you must accept the license agreement.
It is best to create a new directory to save the downloadbundles to, as the next step will extract several directories andfiles into this directory.
2. Extract the contents of the 32-bit versionsand the 64-bit versions of the compressed tar files:
On SPARC processors:
% zcat jdk-7u<version>-solaris-sparc.tar.Z | tar xf - % zcat jdk-7u<version>-solaris-sparcv9.tar.Z | tar xf -
On x64/EM64T processors:
% zcat jdk-7u<version>-solaris-i586.tar.Z | tar xf - % zcat jdk-7u<version>-solaris-x64.tar.Z | tar xf -
The first command creates a number of directories(SUNWj7rt,SUNWj7dev,SUNWj7cfg,SUNWj7man, andSUNWj7jmp) plus a few files in the currentdirectory.
The second command creates several directories(SUNWj7rtx andSUNWj7dvx) inthe current directory, which contain 64-bit support for theJDK.
3. Assume the root role. You can use theroles(1) command to determine whether you are able toassume the root role.
4. Uninstall any earlier installation of the JDKpackages.
If your machine has an earlier 32-bit or 64-bit version ofthe JDK installed in the default location(/usr/jdk/jdk1.<major version>.0_<minorversion>), you must uninstall it before installing alater version at that location.
You can skip this step if you intend to install the JDK in anon-default location. For more details, seeSelecting the Default Java Platform.
5. Run thepkgadd command to install the 32-bit and64-bit packages.
# pkgadd -d . SUNWj7rt SUNWj7dev SUNWj7cfg SUNWj7man # pkgadd -d . SUNWj7rtx SUNWj7dvx
The first command installs the JDK into/usr/jdk/jdk1.7.0_<version>.
The second command installs the files for 64-bit support intothe JDKinstallation at/usr/jdk/jdk1.7.0_<version>.
See thepkgadd(1) andadmin(4) manpages for information on installing the JDK in a non-defaultlocation.
6. For Japanese users: Install man pages.
If your machine has an earlier version of the Japanese man pagesalreadyinstalled inusr/jdk/jdk1.7.0_<version>,you must uninstall thatpackage before installing this version of the Japanese man pages atthat location. Remove that package by running:
# pkgrm SUNWj7jmp
Then run thepkgadd command to install the newJapanese man page package.
# pkgadd -d . SUNWj7jmp
7. To save space, delete the tar files and extracted SUNW*directories.
8. Exit the root role. Noneed to reboot.
You must register the Java Plug-in component with Firefox for thePlug-in to work. Instructions to do this can be found atManual Installation and Registrationof Java Plug-in for Oracle Solaris.
Java Plug-in is supported for the browsers listed inJDK 7 and JRE 7 Certified System Configurations.
If you are using a non-supported browser, check your browserdocumentation for details on registering the Java Plug-in.
This JDK release includes Java Web Start; Java Web Start isautomatically installed with the JDK. But note the following:
pkgadd utility use: (1) If youuse thepkgadd utility to install the Oracle Solaris packagesfor the JDK, a symbolic link for../java/bin/javaws iscreated in/usr/bin. (2) If you have a previousrelease of Java Web Start installed and you want the latest versionto run instead, edit the$HOME/.mailcap file so thatit is identical to/etc/.mailcap. If you want theolder version of Java Web Start to run, do not edit$HOME/.mailcap.The following are general notes about the installation.
This section describes how the default Java platform is selectedwhen running the Oracle Solaris SVR4 package installation (via thepkgadd command) of the JDK.
The Default Java Platform - Several versions ofthe Java platform can be present simultaneously on a Oracle Solaris system(using the default Oracle Solaris package installations), but only one canbe the "default" Java platform. The default Java platformis defined by the directory that the/usr/java symbolic link points to. Todetermine the default version of thejava executable,run:
% /usr/java/bin/java -fullversion
The/usr/java symbolic link can change the defaultJava platform because there are symbolic links in/usr/bin (also known as/bin) that useit. (For example, the/usr/bin/java link refers to/usr/java/bin/java, which is the Java RuntimeEnvironment). Many Java applications are compatible with laterversions of the Java platform, but some applications might be lesscompatible.
PATH Setting - The default Java is linkedthrough/usr/bin, such as/usr/bin/java.If this is in the path before another version of Java is in thepath, then that will be the version of Java run from the commandline or from any other tool that uses the PATH environment variableto locate Java.