Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/indispensable.git
#LyX 1.6.7 created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
\textclass scrbook
\begin_preamble
\input{preamble.tex}
\end_preamble
\options twoside,pointlessnumbers,obeyspaces,plainpages=false,pdfpagelabels 
\use_default_options false
\language english
\inputencoding utf8
\font_roman lmodern
\font_sans helvet
\font_typewriter courier
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\float_placement H
\paperfontsize default
\spacing single
\use_hyperref true
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder false
\pdf_colorlinks false
\pdf_backref false
\pdf_pdfusetitle true
\papersize letterpaper
\use_geometry false
\use_amsmath 2
\use_esint 1
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\bullet 0 5 11 -1
\bullet 1 5 24 -1
\bullet 2 0 0 -1
\tracking_changes false
\output_changes false
\author "" 
\author "" 
\end_header

\begin_body

\begin_layout Section
Java
\end_layout

\begin_layout Standard
Java is used by many mainstream software applications and software development
 tools.
 As such, Java is often bundled with them.
 This can result in several different Java Virtual Machines (JVMs), and
 versions, installed on the same computer.
 To exacerbate the issue, many Linux distributions (such as SUSE, Mandrake,
 RedHat, and Ubuntu) install the OpenJDK, or IcedTea, and the GNU Compiler
 for Java (GCJ) system-wide.
 This causes many other problems.
\end_layout

\begin_layout Standard
The following instructions describe how to install the Java Development
 Kit (JDK) on a typical Linux distribution.
 You can adapt the commands to other platforms.
\end_layout

\begin_layout Standard
To simplify the Java environment install and configure Java as follows:
\end_layout

\begin_layout Enumerate
Login to a user account.
\end_layout

\begin_layout Enumerate
Delete or uninstall all previous Java installations and Java compilers.
 For example, type:
\end_layout

\begin_deeper
\begin_layout LyX-Code
sudo aptitude remove openjdk-6-jdk openjdk-6-jre
\end_layout

\begin_layout LyX-Code
sudo aptitude remove icedtea-6-jre-cacao gcj
\end_layout

\end_deeper
\begin_layout Enumerate
Download the JDK into 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

.
\begin_inset Foot
status collapsed

\begin_layout Plain Layout
\begin_inset CommandInset href
LatexCommand href
target "http://www.oracle.com/technetwork/java/javase/downloads/"

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Enumerate
Install the JDK.
\end_layout

\begin_deeper
\begin_layout Enumerate
Open a terminal.
\end_layout

\begin_layout Enumerate
Extract the contents of the JDK
\begin_inset Foot
status collapsed

\begin_layout Plain Layout
Change the version number where appropriate.
\end_layout

\end_inset

 archive into 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirrootprog{}
\end_layout

\end_inset

 as follows:
\begin_inset Foot
status collapsed

\begin_layout Plain Layout
Use 
\family typewriter
/opt/
\family default
 for precompiled binaries, such as the JDK.
 Use 
\family typewriter
/usr/local/
\family default
 for manually compiled binaries.
\end_layout

\end_inset


\end_layout

\begin_deeper
\begin_layout LyX-Code

\family typewriter
sudo su -
\end_layout

\begin_layout LyX-Code
cd 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirrootprog{}
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
chmod +x 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

jdk*.bin
\end_layout

\begin_layout LyX-Code
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

jdk*.bin
\end_layout

\begin_layout LyX-Code
ln -s 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirrootprog{}
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirseparator{}
\end_layout

\end_inset

jdk1.6.0_24 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirrootprog{}
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirseparator{}
\end_layout

\end_inset

jdk
\end_layout

\end_deeper
\begin_layout Standard
The JDK is installed and a symbolic link is created.
 Note: To simplify JDK upgrades, the symbolic link must not contain the
 version number.
\end_layout

\end_deeper
\begin_layout Enumerate
Logout of the root account.
\end_layout

\begin_layout Enumerate
Edit 
\family typewriter
$HOME
\family default

\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirseparator{}
\end_layout

\end_inset


\family typewriter
.bashrc
\family default
.
\end_layout

\begin_layout Enumerate
Append the following text:
\end_layout

\begin_deeper
\begin_layout LyX-Code
JAVA_HOME=
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirrootprog{}
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirseparator{}
\end_layout

\end_inset

jdk
\end_layout

\begin_layout LyX-Code
PATH=$PATH:$HOME
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirseparator{}
\end_layout

\end_inset

bin:$JAVA_HOME
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirseparator{}
\end_layout

\end_inset

bin
\end_layout

\begin_layout LyX-Code
export PATH JAVA_HOME
\end_layout

\end_deeper
\begin_layout Enumerate
Save the file.
\end_layout

\begin_layout Enumerate
Either logout and login again, or type the following to update the environment
 settings:
\end_layout

\begin_deeper
\begin_layout LyX-Code
source $HOME
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirseparator{}
\end_layout

\end_inset

.bashrc
\end_layout

\end_deeper
\begin_layout Standard
After setting the 
\family typewriter
JAVA_HOME
\family default
 and 
\family typewriter
PATH
\family default
 environment variables, you will seldom need to change them again.
 All future JDK upgrades are accomplished by following steps 3 and 4 (to
 download and extract the JDK).
 In addition to simplicity, this installation process has the following
 advantages:
\end_layout

\begin_layout Itemize
No other versions of Java are installed, which eliminates potential conflicts.
\end_layout

\begin_layout Itemize
You can install multiple JDKs; change the symbolic link to switch between
 them.
\end_layout

\begin_layout Itemize
All the files related to Java are located in a single location.
\end_layout

\begin_layout Itemize
You know exactly what version of Java runs the applications.
\end_layout

\begin_layout Standard
As this installation method does not use the system package manager, some
 applications (for example, LibreOffice) cannot reliably detect the Java
 installation during their own installation process.
\end_layout

\end_body
\end_document