How to Install JDK 1.6 on a Solaris

Solaris is a Unix-based operating system designed and marketed by Sun Microsystems. Solaris can be used as a complete software production system, with Java being included. To write Java programs on a Solaris system, the Java Development Kit (JDK) must be installed. The javac compiler can be used to compile all of your Java source files easily from the terminal of your Solaris system.

Instructions

    • 1

      Point your Web browser to the Java JDK download page (see Resource 1). Click on the download link in the listing located on the bottom half of the page that matches your specific Solaris machine type. If the system is running a 32-bit Intel or AMD processor, click the link labeled "jdk-6u26-solaris-i586.tar.Z"; for SPARC systems less than Version 9, click "jdk-6u26-solaris-sparc.tar.Z"; for SPARC systems that are Version 9, click "jdk-6u26-solaris-sparcv9.tar.Z"; and for Intel or AMD systems that are 64-bit, click "jdk-6u26-solaris-x64.tar.Z."

    • 2

      Read and agree to the Terms of Use provided on the page that appears after clicking your needed download link. Place a check mark in the box next to "I Agree" at the bottom of the agreement block.

    • 3

      Save the file to a directory of your choosing on your Solaris system. A good location is "/usr/bin." This directory can be typed in your browser download window when asking you where you would like the file to be saved.

    • 4

      Launch your Solaris console terminal screen and navigate to the directory in which you saved the downloaded JDK file. In this example, if you saved the file "jdk-6u26-solaris-i586.tar.Z" into the directory "/usr/bin," enter the following at the terminal command prompt:

      cd /usr/bin

    • 5

      Extract the files in the compressed file by entering the following command at the prompt, replacing the file name used here with the actual file name for the file you downloaded:

      zcat jdk-6u26-solaris-i586.tar.Z | tar -xf -

      Wait for the file to be completely extracted. When it is finished, you will receive a command prompt with a cursor marker indicating you can type further commands.

    • 6

      Change to superuser mode in the terminal by typing "su" at the command prompt, then pressing the "Enter" key on the keyboard. The next line will require you to enter your administrator password. Enter it, then press the "Enter" key on the keyboard.

    • 7

      Uninstall any currently installed version of Java by removing the package as follows:

      pkgrm SUNWj6rtx SUNWj6dvx SUNWj6dmx

    • 8

      Install the new JDK 1.6 version by typing the following at the command prompt:

      pkgadd -d . SUNWj6rtx SUNWj6dvx SUNWj6dmx

      Wait for the package to become fully installed, at which time the command prompt will reappear waiting for additional commands to be entered.

    • 9

      Delete the downloaded compressed file to free up system space on your hard drive. Enter the following at the command prompt while still within the directory where it is located: "

      rm jdk-6u26-solaris-i586.tar.Z

      Replace the file name with the actual name of the file you are deleting.

Tips & Warnings

  • Always remove the currently installed version of Java before installing the latest version. Failure to do so can result in software conflicts on a Solaris system that can make the Java compiler inoperable.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值