Installing Java 1.4.1 under SPARC Solaris 2.8
Oct 1, 2002, By Jan Labanowski, jklccl.net
1. Went to http://java.sun.com/ click on QuickLinks J2SE 1.4.1 download
Retrieved SolarisTM SPARCTM 32-bit binary
j2sdk-1_4_1-solaris-sparc.sh Filesize = 42471963 bytes.
and saved it to /tmp (but you probably want to keep the original
distribution in some more permanent directory in case you want to
reinsall Java.
2. created a directory, cd-ed to it and unpacked the archive
mkdir /usr/local/j2sdk1.4.1_00-temp
cd /usr/local/j2sdk1.4.1_00-temp
sh j2sdk-1_4_1-solaris-sparc.sh
Answered: yes to the question asking if I agree with the license.
3. This created directory: j2sdk1.4.1 under /usr/local/j2sdk1.4.1_00-temp
Since I did not like it (/usr/local/j2sdk1.4.1_00-temp/j2sdk1.4.1)
I did:
cd /usr/local/j2sdk1.4.1_00-temp
mv j2sdk1.4.1 ../j2sdk1.4.1_00
cd ..
ln -s j2sdk1.4.1_00 j2sdk1.4.1
rmdir /usr/local/j2sdk1.4.1_00-temp
4. Added the following to the .profile file for the account which uses
Bourne type shell (i.e., /bin/sh, /bin/ksh) as default:
JAVA_HOME=/usr/local/j2sdk1.4.1
PATH=${JAVA_HOME}/bin:${PATH}
MANPATH=${JAVA_HOME}/man:${MANPATH}
export JAVA_HOME PATH MANPATH
Alternatively, you could create a small sript file with the above
definitions (say: j4). In my case it was:
. /home/webrun/j4
when you want to switch to using J2SDK1.4.1
If you still use C-sh (e.g., /bin/csh or /bin/tcsh) you should
switch to Bourne type shell. The C-shell has some problems. One
which will hit you soon is the fact that environment variables are
restricted to 1024 characters -- you can easily go above this limit
with longer CLASSPATHs and PATHs. But if you insist, add this to
.cshrc file for the account
setenv JAVA_HOME /usr/local/j2sdk1.4.1
setenv PATH ${PATH}:/usr/local/j2sdk1.4.1/bin
setenv MANPATH /usr/local/j2sdk1.4.1/man:${MANPATH}
or save it in a small file (say: j4-csh) and run it as:
source j4-csh
before switching to J2SDK1.4.1
5. Default distribution on Java SDK comes with weak encryptions (some
governments do not like you to install strong encryption and want
to read your stuff -- they say it is for your protection, since
they want to read files of bad guys -- the problem is that
bad guys are using strong encryption and do not give a damn what
government wants. Moreover, government knows it very well).
To upgrade your encryption, you need to download another file from
Sun. Go to: http://java.sun.com/j2se/1.4.1/download.html and get
to the bottom of the page and get Java Cryptography Extension (JCE)
Unlimited Strength Jurisdiction Policy Files:
jce_policy-1_4_1.zip. Filesize = 9,715 bytes.
Unzip the file anywhere: (e.g., you can use a command:
jar xvf jce_policy-1_4_1.zip
or if you have unzip installed:
unzip jce_policy-1_4_1.zip
It will create a subdirectory jce and, under it, the following files:
README.txt This file
COPYRIGHT.html Copyright information
local_policy.jar Unlimited strength local policy file
US_export_policy.jar Unlimited strength US export policy file
Copy these files to lib/security directory of your Java Runtime Environment
In short, I did:
mkdir ${JAVA_HOME}/jre/lib/security/limited-strength
cp -p ${JAVA_HOME}/jre/lib/security/*.jar \
${JAVA_HOME}/jre/lib/security/limited-strength
cd /full/path/to/jce_policy_files/from_above/jce
cp * ${JAVA_HOME}/jre/lib/security
6. Installed patches for Solaris.
Went to the page which shows a table of downloads for J2SE 1.4.1
(http://java.sun.com/j2se/1.4.1/download.html)
and downloaded Solaris OS Patches for Solaris SPARC
First, it shows you a table of available patch clusters. I chose
J2SE Solaris 8 4/15/2002 (Click on README to learn how to install them).
I did it as:
a) Retrieved it from the FTP site. They tell you that it will be about
4.5 MBytes of stuff, but it is actually: 41478274 Bytes (i.e, 41MB).
as of Oct 1, 2002.
You should get a file: J2SE_Solaris_8_Recommended-Patches.zip
b) Unzip the file anywhere (e.g., in /tmp) and you will get:
unzip J2SE_Solaris_8_Recommended-Patches.zip
c) Apply patches:
cd J2SE_Solaris_8_Recommended
./install_cluster
and wait for a while (I mean, a good while -- 43 MBytes to chew).
Some patches may already be installed, or newer patches are already
there, so it will tell you that Installation failed, especially
towards the end of the list. Since in my case some newer patches
were installed and some old ones were not, I had to actually run
the install_cluster twice, to make sure that dependencies are
satisfied.
Then at the end I rebooted the machine by using the command:
/usr/sbin/shutdown -i 6 -g0 'Rebooting heechee after patches'
In my case, I had to additionally log in to a console server, since
machine does not have a monitor and dumps stuff to a serial port.
7. To see if things work, run the simple test: compile and execute Java
HelloWord test application:
a) Save the following in the file HelloWorld.java:
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World, my dear");
}
}
b) Compile the source as:
javac HelloWorld.java
c) Run Java application as:
java HelloWorld
It should say:
Hello World, my dear
8. Now, it is time to install docs. The site:
http://java.sun.com/j2se/1.4.1/download.html
contains documentation for J2SDK. It is a file called:
j2sdk-1_4_1-doc.zip 32765641 bytes long as of Oct 1, 2002
I unpacked it in $JAVA_HOME, which creates the directory ./doc
cd $JAVA_HOME
unzip /full/path/j2sdk-1_4_1-doc.zip
You can link this directory to some name within your Web Server Document
Root for viewing.