Go Back   TechArena Community > Software > Tips & Tweaks
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Thread Tools Search this Thread
Old 23-04-2012
Join Date: Apr 2008
Posts: 436
How to Install Java on Solaris

Installing Java 6 on Solaris 10 64bit

Installing Java provides two-way: using pkgadd or through self-extracting file. The first dilemma is choosing which of the two formats is that we want to use, and well, this depends largely on what kind of applications we have installed and certified.

I mean, imagine we have an application APP which is certified only and exclusively for Java 1.5.x, and incompatible with 1.6.x. In this situation we have two solutions:
  • PATH correctly set so that only running version 1.5.x
  • Do not install another virtual machine other than the 1.5.x
Well, on the basis that we do not have these problems, and focusing on the topic of the post, let's see what are the differences between the self-extracting installations using pkgadd.

Installation with <pkgadd>

This type of installation requires access as <root> as we register the package in the database software installed Solaris. Has the advantage that if we perform an installation of patches, to be declared on the basis of software installed, you may apply the necessary automatically.

We should note that if we do this from the global zone, and do not say otherwise, it will install in all areas, this may be a type of problem when we have several areas with different requirements for Java, ie Oracle, Tomcat, ActiveMQ, ...

The first thing to do is download Java 6 JDK or JRE from Sun and select the architecture of our platform, in my case Solaris SPARC.

In the download page after logearnos, we will have four options:
  • jdk-VERSION-solaris-sparc.tar.Z
  • jdk-VERSION-solaris-sparcv9.tar.Z
  • jdk-VERSION-solaris-sparc.sh
  • jdk-VERSION-solaris-sparcv9.sh

<tar.Z> Versions is the type of installation with pkgadd and versions to versions selfextracting <sh> also 64-bit versions are referenced as SPARC and 32-bit sparcv9 as sparc. Then let us see how to install the packages, (really the same process as any other package in Solaris, in my example but you can select install all you want to install)
# Zcat jdk-6u17-solaris-sparc.tar.Z | tar xpf - 
# Pkgadd-d

Select package (s) you wish to process (or 'all' to process all packages). (Default: all) [?,??, Q]: all

The installer will do this task for each of the zones. Once completed, you already have Java installed our version

Installing from file sh

This type of installation is <root> privileges, since it is a shx file (self extracting) and therefore only need write permissions on the directory in which we extract it, however, unlike the installation using < pkgadd> is not reflected in the database installed software, and therefore, when patch is installed it will not apply changes to the package JDK.

Continuing with the installation using sh file, I extract it in / usr / jdk / instances and so if I need to be root

This time, we are interested <sh> versions of Sun's download page. Remember that when transferring files to the server via ftp if we do, we assign the transfer type as binary since it does not extract properly. If we use sftp, no problem

Once uploaded to the server, simply owe you run in the directory you want to remove, for example, in my case are the sh $ HOME/jdk/6 / and I want to install in / usr / jdk / instances so I do the following
# Cd / usr / jdk / instances 
# Sh $ HOME/jdk/6/jdk-6u17-solaris-sparc.sh
Now get a license message, press Q and accept the license
Do you agree to the license terms Above? [Yes or no]
Repeat the same procedure for the 64bit version
# Cd / usr / jdk / instances 
# Sh $ HOME/jdk/6/jdk-6u17-solaris-sparcv9.sh
We have completed the installation of Java.

Make this the default version

After installing the new version of Java, our system will call the version of Java you have on the PATH, ie / usr / bin / java is a link to / usr / java / bin / java, so to make be our default we have two options:
  • Set the PATH environment variable like PATH = / usr/jdk/instances/jdk1.6.0_17/bin: $ PATH
  • Delete and create the link from / usr / java / usr/jdk/instances/jdk1.6.0_17 /

See how to recreate the link
# Which java 
# Ls-l / usr / bin / java 
# Ls-l / usr / java 
# Rm / usr / java 
# Ln-s / usr/jdk/instances/jdk1.6.0_17 / usr / java 
# Java-version
In both cases, the Java installation is not of major problem, however, the decision to install one way or another depend mainly on the type of software we have installed.
Reply With Quote
Old 23-04-2012
Join Date: Aug 2011
Posts: 302
Re: How to Install Java on Solaris

Do you know how to Configure and Enable Java in Solaris 10
  • Go to the plugins subdirectory of Mozilla installation.
  • Create a link to the Java plugin file. In this example, directory> <Java installation directory stands for any to have Java installed. Type "A s <Directory <Java installation / plugin/sparc/ns610/libjavaplugin_oji.so". Be sure to include space and at the end.
  • Mozilla Home. Click "Edit". Click "Preferences". Click "Advanced". Select "Enable Java".
Reply With Quote

  TechArena Community > Software > Tips & Tweaks
Tags: , , , ,

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "How to Install Java on Solaris"
Thread Thread Starter Forum Replies Last Post
How to Install Java on Mac Krishnaraju Tips & Tweaks 2 23-04-2012 03:41 PM
How to Install Java on Windows XP Aaaa-chooo Operating Systems 8 22-04-2012 02:05 PM
Can't install Sun Java 6 JDK Gabrieel Operating Systems 4 24-04-2010 06:02 AM
Cannot Install Java in Windows 7 BUCK Windows Software 3 19-10-2009 05:45 PM

All times are GMT +5.5. The time now is 02:53 PM.