%general-entities; ]> $Date$ JDK-&jdk-version; JDK Introduction to JDK The JDK package contains Sun's Java development environment. This is useful for developing Java programs and provides the runtime environment necessary to run Java programs. It also includes a plug-in for browsers so that they can be Java aware. Package Information Download (jdk-&jdk-bin-version;-linux-i586.bin): Download MD5 sum: &jdk-md5sum; Download size (binary): &jdk-size; Estimated disk space required: &jdk-buildsize; Estimated build time: &jdk-build-time; JDK Dependencies Optional Runtime Dependencies , , and User Notes: Installation of JDK The ./jdk-&jdk-bin-version;-linux-i586.bin command below unpacks the distribution into a jdk&jdk-version-string; directory. You will be required to view, and then accept (by entering a y keypress), a license agreement before any files are unpacked. If you are scripting (automating) the build, you'll need to account for this. There is information about automating build commands in the section of Chapter 2. Towards the end of this section, specific information for automating this type of installation is discussed. Normally in BLFS, the files are unpacked into a subdirectory and the starting point for the installation procedures is that location. For this application only, start in the directory where all the downloaded files are located. Install the JDK with the following commands: chmod 755 jdk-&jdk-bin-version;-linux-i586.bin && ./jdk-&jdk-bin-version;-linux-i586.bin The installation will end with a message "./jdk-&jdk-bin-version;-linux-i586.bin: line 43: 20283 Aborted" as javaprefix is unset in the environment. This is by design as GTK+ may not be installed during the installation, however, the installation will still exit with a zero error value if scripting the build. Now, as the root user: cd jdk&jdk-version-string; && install -v -m755 -d /opt/jdk-&jdk-bin-version; && mv -v * /opt/jdk-&jdk-bin-version; && chown -v -R root:root /opt/jdk-&jdk-bin-version; && ln -v -sf xawt/libmawt.so \ /opt/jdk-&jdk-bin-version;/jre/lib/i386/ && cd .. Recent versions of libX11 break libmawt when used with the Xinerama extension. While still the root user, apply the following sed to work around this problem: sed -i 's@XINERAMA@FAKEEXTN@g' \ /opt/jdk-&jdk-bin-version;/jre/lib/i386/xawt/libmawt.so Command Explanations ln -sf xawt/libmawt.so /opt/jdk-&jdk-bin-version;/jre/lib/i386/: This fixes linking issues with other applications that expect to find the motif libraries with the other JDK libraries. Configuring JDK Configuration Information As the root user, create a symlink to the installation directory: ln -v -nsf jdk-&jdk-bin-version; /opt/jdk The information below assumes your system is set up using the instructions found in . You may need to extract the relevant information below and incorporate it into your system's startup files if your system is set up differently. Add the following jdk.sh shell startup file to the /etc/profile.d directory with the following commands as the root user: cat > /etc/profile.d/jdk.sh << "EOF" # Begin /etc/profile.d/jdk.sh # Set JAVA_HOME directory JAVA_HOME=/opt/jdk # Adjust PATH pathappend ${JAVA_HOME}/bin PATH # Auto Java CLASSPATH # Copy jar files to, or create symlinks in this directory AUTO_CLASSPATH_DIR=/usr/lib/classpath pathprepend . CLASSPATH for dir in `find ${AUTO_CLASSPATH_DIR} -type d 2>/dev/null`; do pathappend $dir CLASSPATH done export JAVA_HOME CLASSPATH unset AUTO_CLASSPATH_DIR unset dir # End /etc/profile.d/jdk.sh EOF The Java plugin is located at $JAVA_HOME/jre/lib/i386/libnpjp2.so. Make a symbolic link to the file from your browser(s) plugins directory. The plugin must be a symlink for it to work. If not, the browsers will crash when you attempt to load a Java application. Contents Installed Programs Installed Libraries Installed Directory appletviewer, apt, extcheck, idlj, HtmlConverter, jar, jarsigner, java, javac, javadoc, javah, javap, java-rmi.cgi, javaws, jconsole, jcontrol, jdb, jhat, jinfo, jmap, jps, jrunscript, jsadebugd, jstack, jstat, jstatd, jvisualvm, keytool, native2ascii, orbd, pack200, policytool, rmic, rmid, rmiregistry, schemagen, serialver, servertool, tnameserv, unpack200, wsgen, wsimport, and xjc $JAVA_HOME/lib/*, $JAVA_HOME/jre/lib/* /opt/jdk-&jdk-bin-version; Short Descriptions appletviewer runs Java applets outside of the context of a browser. appletviewer apt is an annotation processing tool. apt extcheck checks a specified jar file for title and version conflicts with any extensions installed in the JDK software. extcheck HtmlConverter adds Java auto download to html and asp pages. HtmlConverter idlj generates Java bindings from a given IDL file. idlj jar combines multiple files into a single jar archive. jar jarsigner signs jar files and verifies the signatures and integrity of a signed jar file. jarsigner java launches a Java application by starting a Java runtime environment, loading a specified class and invoking its main method. java javac reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files. javac javadoc parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages describing the classes, interfaces,constructors, methods, and fields. javadoc javah generates C header and source files that are needed to implement native methods. javah javap disassembles a Java class file. javap java-rmi.cgi is the Java RMI client. java-rmi.cgi javaws launches Java application/applets hosted on a network. javaws jconsole is a graphical console tool to monitor and manage both local and remote Java applications and virtual machines. jconsole jcontrol is a graphical control panel for Java. jcontrol jdb is a simple command-line debugger for Java classes. jdb jhat parses a java heap dump file and allows viewing in a webbrowser. jhat jinfo prints Java configuration information for a given Java process, core file, or a remote debug server. jinfo jmap prints shared object memory maps or heap memory details of a given process, core file, or a remote debug server. jmap jps lists the instrumented JVMs on the target system. jps jrunscript is a command line script shell. jrunscript jsadebugd attaches to a Java process or core file and acts as a debug server. jsadebugd jstack prints Java stack traces of Java threads for a given Java process, core file, or a remote debug server. jstack jstat displays performance statistics for an instrumented JVM. jstat jstatd is an RMI server application that monitors for the creation and termination of instrumented JVMs. jstatd jvisualvm is an intuitive graphical user interface that provides detailed information about Java applications while they are running on a given JVM. jvisualvm keytool is a key and certificate management utility. keytool native2ascii converts files that contain non-supported character encoding into files containing Latin-1 or Unicode-encoded characters. native2ascii orbd is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment. orbd pack200 is a Java application that transforms a jar file into a compressed pack200 file using the Java gzip compressor. pack200 policytool creates and manages a policy file graphically. policytool rmic generates stub and skeleton class files for remote objects from the names of compiled Java classes that contain remote object implementations. rmic rmid starts the activation system daemon. rmid rmiregistry creates and starts a remote object registry on the specified port on the current host. rmiregistry schemagen is a Java XML binding schema generator. schemagen serialver returns the serialVersionUID for one or more classes in a form suitable for copying into an evolving class. serialver servertool provides an ease-of-use interface for application programmers to register, unregister, startup and shutdown a server. servertool tnameserv starts the Java IDL name server. tnameserv unpack200 is a native implementation that transforms a packed file produced by pack200 into a jar file. unpack200 wsgen generates JAX-WS portable artifacts used in JAX-WS web services. wsgen wsimport generates JAX-WS portable artifacts. wsimport xjc is a Java XML binding compiler. xjc