Installing J2EE 1.3 beta (May 2000) bundle from Sun
This is a log of my install of Sun's J2EE SDK under Linux RH6.2 on 600MHz
Pentium III with 256MB of RAM.
My RH6.2 PC has all the updates until end of February 2001. It also had
updated kernel, and Oracle 8.1.7.0.1 installed. For details look at
http://www.ccl.net/cca/software/UNIX/oracle/RH6.2/, my Oracle install notes.
Installing the Standard Edition of Java 2 1.3
Before you can run J2EE, you need to install J2SE. I logged in as root.
JDK1.3. It is available from http://java.sun.com/j2se/1.3/.
I took the Linux x86 distribution j2sdk-1_3_0_02-linux.bin 27,092,454 bytes.
I also downloaded the Documentation bundle for J2SDK:
j2sdk-1_3_0-update1-doc.tar.gz = 13,186,129 bytes.
I retrieved the j2sdk-1_3_0_02-linux.bin and j2sdk-1_3_0-update1-doc.tar.gz
from Sun and saved them in /tmp/jdk on my Linux PC. I unpacked them first
in /tmp/jdk to make sure what are the top directories they create.
Then I did a real install as:
cd /tmp/jdk
mv j2sdk-1_3_0_02-linux.bin /usr/local
cd /usr/local
sh j2sdk-1_3_0_02-linux.bin
I said Yes, and it unpacked creating the directory: /usr/local/jdk1.3.0_02
I removed my previous link to jdk1.3 (I had previous version installed before).
and temporarily moved /usr/local/jdk1.3.0_02 to /usr/local/jdk1.3
cd /usr/local
rm jdk1.3
mv jdk1.3.0_02 jdk1.3
Now, I installed documentation bundle and moved jdk1.3 back to what it was
and make a link, and then updated my environment.
cd /tmp/jdk
mv j2sdk-1_3_0-update1-doc.tar.gz /usr/local
cd /usr/local
tar zxvf j2sdk-1_3_0-update1-doc.tar.gz
mv jdk1.3 jdk1.3.0_02
ln -s jdk1.3.0_02 jdk1.3
JAVA_HOME=/usr/local/jdk1.3
PATH=${PATH}:${JAVA_HOME}/bin
CLASSPATH=${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export JAVA_HOME PATH CLASSPATH
At this point I created in the file /root/j2eeenv.sh where I was
callecting all needed environment variables so I can log out any moment
and then restore the needed environment by sourcing this script:
. /root/j2eeenv.sh
At this moment, the script was:
JAVA_HOME=/usr/local/jdk1.3
PATH=${PATH}:${JAVA_HOME}/bin
CLASSPATH=${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export JAVA_HOME PATH CLASSPATH
Then I deleted the compressed archives from /usr/local and/or the /tmp/jdk
directory (actually, I did not delete them, but saved them in my
upload directory in case I ever need them again).
Installing the secure sockets and crypto stuff.
Installed JCE 1.2.1 Java Cryptography Extension 1.2.1
Go to: http://www.javasoft.com/products/jce/
Click on: Download JCE 1.2.1 Software, policy files, and docs
This will get you: jce-1_2_1.zip. I assume that you saved it in /tmp
mkdir /usr/local/JCE
cd /usr/local/JCE
cp /tmp/jce-1_2_1.zip .
unzip jce-1_2_1.zip
Then added the security provider to Java:
a) copied JCE jars to lib/ext
cp -p /usr/local/JCE/jce1.2.1/lib/*.jar /usr/local/jdk1.3/jre/lib/ext
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jce1_2_1.jar
export CLASSPATH
b) edited /usr/local/jdk1.3/jre/lib/security/java.security and added
line:
security.provider.3=com.sun.crypto.provider.SunJCE
Installed JSSE (JavaTM Secure Socket Extension (JSSE) 1.0.2)
available from http://java.sun.com/products/jsse/
mkdir /usr/local/jsse
with a browser go to: http://java.sun.com/products/jsse/
Click on domestic distribution
Logged in, accepted, continue, answered Yes, Continue,
downloaded jsse-1_0_2-do.zip (to /tmp for example
cd /usr/local/jsse
cp /tmp/jsse-1_0_2-do.zip .
unzip jsse-1_0_2-do.zip
I installed the JSSE as "installed extension" for jdk1.3 and
copied them to /usr/local/jdk1.3/jre/lib/ext directory
($JAVA_HOME/jre/lib/ext):
cp -p /usr/local/jsse/jsse1.0.2/lib/*jar ${JAVA_HOME}/jre/lib/ext
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jcert.jar
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jnet.jar
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jsse.jar
export CLASSPATH
Then, I registered the provider in $JAVA_HOME/jre/lib/security/java.security
by adding a line:
security.provider.4=com.sun.net.ssl.internal.ssl.Provider
Installing the J2EE
Went to the site: http://java.sun.com/j2ee/j2sdkee/
and downloaded the Java 2 SDK Enterprise Edition v1.2.1 for Linux as one file.
I downloaded them to /tmp (but in fact, I have some special directory where
I keep my downloads). The file was: j2sdkee-1_2_1-linux.tar.gz =10,079,329
I also downloaded the documentation bundle. The file was:
j2sdkee-1_2_1-doc-linux.tar.gz = 4,466,923 bytes. I used tar ztvf file
to check what is the top directory of the distribution. They both have
j2sdkee1.2.1 as top. I assume that you do not have the
/usr/local/j2ee directory yet. If you have, move it to j2ee-old or
something. So what I did is:
cd /usr/local
tar zxvf /tmp/j2sdkee-1_2_1-linux.tar.gz
tar zxvf /tmp/j2sdkee-1_2_1-doc-linux.tar.gz
ln -s j2sdkee1.2.1 j2ee
I coied the file /usr/local/j2ee/bin/userconfig.sh to userconfig.sh-orig
cd /usr/local/j2ee/bin
cp -p /userconfig.sh userconfig.sh-orig
and edited userconfig.sh to be:
---------------- cut --------------------------
# J2EE_CLASSPATH is appended to the classpath referenced by the EJB server.
# J2EE_CLASSPATH must include the location of the JDBC driver classes
# (except for the Cloudscape driver shipped with this release).
# Each directory is delimited by a colon.
ORACLE_HOME=/u01/app/oracle/product/8.1.7.0.1
export ORACLE_HOME
# classes111_g.zip is the JDBC driver with debug info
J2EE_CLASSPATH=${ORACLE_HOME}/jdbc/lib/classes111_g.zip
J2EE_CLASSPATH=${J2EE_CLASSPATH}:${ORACLE_HOME}/jdbc/lib/nls_charset11.zip
export J2EE_CLASSPATH
if [ "xXx$LD_LIBRARY_PATH" != "xXx" ]; then
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ORACLE_HOME}/jdbc/lib
else
LD_LIBRARY_PATH=${ORACLE_HOME}/jdbc/lib
fi
export LD_LIBRARY_PATH
# JAVA_HOME refers to the directory where the Java(tm) 2 SDK
# Standard Edition software is installed.
JAVA_HOME=/usr/local/jdk1.3
export JAVA_HOME
# No JIT compiler by default
JAVA_COMPILER=NONE
export JAVA_COMPILER
---------------- cut --------------------------
I created a user and group j2eeinst and j2eerun as:
groupadd j2eeinst
useradd j2eeinst -g j2eeinst
passwd j2eeinst
groupadd j2eerun
useradd j2eerun -g j2eerun
passwd j2eerun
The j2eeinst user (the installer) will own the files, while
the j2eerun will be the user id which which the J2EE components will be
running.
I then changed the ownership of files under /usr/local/j2ee to j2eeinst
cd /usr/local/j2ee
chown -R j2eeinst.j2eeinst .
I then loggout as root, and logged in as j2eeinst.
I edited the .bash_profile file in my /home/j2eeinst to be:
----------- cut ----------------
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="j2eeinst"
export USERNAME BASH_ENV PATH
alias emacs='emacs -nw'
JAVA_HOME=/usr/local/jdk1.3
export JAVA_HOME
PATH=${PATH}:${JAVA_HOME}/bin
CLASSPATH=${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export JAVA_HOME PATH CLASSPATH
J2EE_HOME=/usr/local/j2ee
export J2EE_HOME
JAVA_HOME=/usr/local/jdk1.3
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jce1_2_1.jar
export CLASSPATH
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jcert.jar
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jnet.jar
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jsse.jar
export CLASSPATH
ORACLE_HOME=/u01/app/oracle/product/8.1.7.0.1
export ORACLE_HOME
------------- cut ------------
and sourced this file:
. /home/j2eeinst/.bash_profile
I then started to read the docs in my browser:
file:///usr/local/j2ee/doc/release/ConigGuide.html
JDBC Drivers:
Copied the JDBC drivers from Oracle to $J2EE_HOME/lib/system:
cd $J2EE_HOME/lib/system
mkdir oracle
cd oracle
cp -p $ORACLE_HOME/jdbc/lib/* .
Then I edited the file /usr/local/j2ee/bin/userconfig.sh
In my case the ORACLE_HOME was: /u01/app/oracle/product/8.1.7.0.1
cp $ORACLE
http://java.sun.com/j2ee/download.html
petstore 1.1.1
jps-1_1_1.zip = 3,283,481 bytes
1.1.1 Release November 15, 2000
JavaTM Pet Store, v. 1.1.1 sample application
Download Java(TM) 2 SDK Enterprise Edition 1.3 (BETA)
j2sdkee-1_3-beta-linux.tar.gz 13,102,721 (SDK)
j2sdkee-1_3-beta-doc-linux.tar.gz = 4,712,557 bytes. (DOC)
J2sdkee-1_3-beta-src-sample_adapters.zip = 47,547 (Sample)
|