Sun Java
  • Java Developer Tools

    See and download all software tools available from Sun.

  • Java Standard Edition

    For developing and deploying Java applications for the desktop, servers, embedded, and real-time environments.

  • Java Enterprise Edition

    For enterprise, server-side Java applications.

  • Java Micro Edition

    For Java applications running on mobile devices.

  • Java Training

    Sharpen your Java skills with courses from the source.

  • Java Support

    Get dedicated help from Sun including technical assistance, product support, and support for deployed Java applications.


Solaris
  • Solaris

    Download the most advanced operating system in the world

  • Sun Studio

    Optimizing compilers and tools for C/C++/Fortran application development

  • Solaris Developer Center

    Explore the resources and community available to the Solaris developer.

  • Sun Developer Services

    Get technical assistance, product support, training, and other services from the source.

  • BigAdmin

    A community site with Solaris system administration information, hardware compatibility, a script library, and other resources for administrators of Sun products.

  • OpenSolaris

    Join the open-source community for collaboration and conversation around the OpenSolaris technology.

Communities
  • OpenJDK

    The place to collaborate on the open-source JDK, an implementation of the Java Platform, Standard Edition specification.

  • Mobile & Embedded

    The Mobile & Embedded Community enables and empowers developers to collaborate and innovate, driving the evolution and adoption of the Java(TM) Platform, Micro Edition (Java ME) for mobile and embedded devices.

  • GlassFish

    The GlassFish community is building free, open source, production-quality, enterprise software.

  • NetBeans

    You have the opportunity to submit bugs and feature requests in IssueZilla, submit news for the NetBeans Community, and contribute code or even create a project of your own. Welcome to the team!

  • OpenSolaris

    The OpenSolaris source code is already cutting edge, but innovation happens everywhere, so we welcome your involvement.

  • OpenSPARC

    OpenSPARC.net is the genesis of a vision to create a larger community where open conversations and collaborative development projects spawn dramatic innovations around chip design.

  • Open Storage

    The OpenSolaris storage community is your gateway to data management related communities and projects - file sharing, file systems, volume managers, data services, storage drivers, and much more.

  • OpenJFX

    Project OpenJFX is a community for sharing early versions of the JavaFX Script language and for collaborating on its development.

  • java.net

    A gathering place for Java technology enthusiasts and existing communities across industries, platforms, and interest groups.

  • Sun Student Developers

    The SDN Academic Developer Program offers you ready access to tools, resources, and student communities.

  • Java Community Process

    The JCP gives you a chance to both have your own work become an official component of the Java platform, and to offer suggestions for improving and growing the technology.


My SDN Account Join SDN
  • Join SDN Now
  • Why Join

    Becoming an Sun Developer Network (SDN) member makes you part of a vibrant worldwide community of developers, and gives you access to cool stuff and exclusive offers.


JavaTM SE 6 Release Notes

Linux Installation (32-bit)


JDK Documentation

Contents

System Requirements
JDK Installation Instructions
   Installation of Self-Extracting Binary
   Installation of RPM File
Java Plugin Browser Registration Instructions
Java Web Start Installation Notes
Troubleshooting

System Requirements

See supported System Configurations for information about supported platforms, operating systems, desktop managers, and browsers.

For issues, see the Troubleshooting section below.

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. After installing the JDK, refer to: Install formats - This version of the JDK is available in two installation formats.
  • Self-extracting Binary File - This file can be used to install the JDK in a location chosen by the user. This one can be installed by anyone (not only root users), and it can easily be installed in any location. As long as you are not root user, it cannot displace the system version of the Java platform suppled by Linux. To use this file, see Installation of Self-Extracting Binary below.

  • RPM Packages - A rpm.bin file containing RPM packages, installed with the rpm utility. Requires root access to install. RPM packages are the recommended method for installation on Linux. To use this bundle, see Installation of RPM File below.
Choose the install format that is most suitable to your needs.
Note: For any text on this page containing the following notation, you must substitute the appropriate JDK update version number for the notation.
<version>
          
For example, if you were downloading update 6_01, the following command:
./jdk-6<version>-linux-i586.bin
          
would become:
./jdk-6u1-linux-i586.bin
          

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 RPM packages instead, see Installation of RPM File.

1. Download and check the download 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.
Run this command:
chmod +x jdk-6<version>-linux-i586.bin

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, prepended by the path to it. For example, if the file is in the current directory, prepend it with "./" (necessary if "." is not in the PATH environment variable):

./jdk-6<version>-linux-i586.bin

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_<version> in the current directory. Follow this link to see its directory structure. The JDK documentation is a separate download.

Note about Root Access: Unbundling the software automatically creates a directory called jdk1.6.0_<version>. Note that if you choose to install the JDK into system-wide location such as /usr/local, you must first become root to gain the necessary permissions. If you do not have root access, simply install the JDK into your home directory, or a subdirectory that you have permission to write to.

Note about Overwriting Files: If you unpack the software in a directory that contains a subdirectory named jdk1.6.0_<version>, the new software overwrites files of the same name in that jdk1.6.0_<version> directory. Please be careful to rename the old directory if it contains files you would like to keep.

Note about System Preferences: By default, the installation script configures the system such that the backing store for system preferences is created inside the JDK's installation directory. If the JDK is installed on a network-mounted drive, it and the system preferences can be exported for sharing with Java runtime environments on other machines.

See the Preferences API documentation for more information about preferences in the Java platform.

Installation of RPM File

Use these instructions if you want to install JDK in the form of RPM packages. If you want to use the self-extracting binary file instead, see Installation of Self-Extracting Binary.

1. Download and check the file size.

You can download to any directory 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. Become root by running the su command and entering the super-user password.

3. Extract and install the contents of the downloaded file.

Change directory to where the downloaded file is located and run these commands to first set the executable permissions and then run the binary to extract and run the RPM file:

chmod a+x jdk-6<version>-linux-i586-rpm.bin

./jdk-6<version>-linux-i586-rpm.bin

Note that the initial "./" is required if you do not have "." in your PATH environment variable.

The script displays a binary license agreement, which you are asked to agree to before installation can proceed. Once you have agreed to the license, the install script creates and runs the file jdk-6<version>-linux-i586.rpm in the current directory.

NOTE - If instead you want to only extract the RPM file but not install it, you can run the .bin file with the -x argument. You do not need to be root to do this.

4. Delete the bin and rpm file if you want to save disk space.

5. Exit the root shell.

The RPM packages creates two links /usr/java/latest and /usr/java/default. 
  • The /usr/java/latest link will always point to the version of Java that Sun Microsystems considers the latest version.  Subsequent upgrades of the packages will overwrite this value if it is not the latest version.
  • By default, /usr/java/default points to /usr/java/latest. However, if administrators change /usr/java/default to  point to another version of Java, subsequent package upgrades will be provided by the administrators and cannot be overwritten.
When the JDK is installed, links to  javac jar and javadoc are also created apart from the JRE links. These links point to the appropriate tool referenced by /usr/java/default. This allows the user to easily run the default version of these Java tools.

A new service script, named jexec, is added to /etc/init.d. This script allows users to directly execute any standalone JAR file that has an execution permission set. This can be demonstrated using an example from the JDK:
	cd /usr/java/jdk1.6.0/demo/jfc/SwingSet2
chmod +x SwingSet2.jar
./SwingSet2.jar

Java Plugin Browser Registration Instructions

You must register the Java Plugin product with Netscape or Mozilla for the Plugin to work. Click on the following link to see the instructions for manual registration. Note that for SuSE the 8.1 or higher version of Mozilla must be used, and for non-SuSE Linux, the version of Mozilla must be 1.1 or higher. Please follow these instructions:

Manual Registration Instructions

Also see documentation on the Java Plugin component.

Java Web Start Installation Notes

This JDK release includes Java Web Start; it is installed automatically 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: If you have a previous release of Java Web Start, do not uninstall it. Uninstalling it will cause the download cache to be cleared, and all previously installed Java Web Start applications will have to be downloaded again. 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 not changed, so all your settings will remain intact after the upgrade.
  • 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 is application/x-java-jnlp-file. It should be handled by the javaws 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

Troubleshooting

  • To print on Linux, the /usr/sbin/lpc utility must be installed. This is a standard Linux utility. On RedHat 7.1, for example, this utility is in the "LPRng-3.7.4-22 RPM" package.