Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > 965e33040dd61030a94f0eb89877aee8 > files > 4124

howto-html-en-20080722-2mdv2010.1.noarch.rpm

<HTML
><HEAD
><TITLE
>Install Java 3D (optional)</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="Nvidia OpenGL Configuration mini-HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Install Software"
HREF="install.html"><LINK
REL="PREVIOUS"
TITLE="Install GLUT 3.7 Distribution (optional)"
HREF="instglut.html"><LINK
REL="NEXT"
TITLE="Final Comments"
HREF="fincomm.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Nvidia OpenGL Configuration mini-HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="instglut.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 3. Install Software</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="fincomm.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="INSTJAVA"
>3.7. Install Java 3D (optional)</A
></H1
><P
>		If you already have a Java Software Development Kit (JSDK) or Java Runtime Environment
		(JRE) installed, then you can skip parts of this section. If you are using a JRE only,
		you'll have to get the JRE version of the Java 3D package and adapt these instructions.
        </P
><P
>        It is recommended that you have the lastest version of Netscape, which at this time of
        writing is 6.2.1, if you plan to install the Java PlugIn for <B
CLASS="COMMAND"
>netscape</B
>.
		It works, but you may (or may not) experience Segmentation Faults when leaving a page
		that contained a Java 3D applet. KDE <A
HREF="http://www.konqueror.org/"
TARGET="_top"
>Konqueror</A
>
		can also be used to view Java 3D applets.
        </P
><P
>		If you have not installed the Java SDK yet, you should have downloaded it already at least.
		Installing the JSDK is simple. You should follow the instructions that comes with it
		or follow my example below, based on using the Sun download.
        <TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>			# The Sun download is a type of binary shell archive (man shar).
			# Make it executable and run it to unpack its contents
			chmod 744 j2sdk-1_3_1_02-linux-i386.bin
			./j2sdk-1_3_1_02-linux-i386.bin
			mv jdk1.3.1_02 /usr/local
			cd /usr/local
			ln -s jdk1.3.1_02 jdk
		</PRE
></FONT
></TD
></TR
></TABLE
>
		</P
><P
>		Next is to unpack Java 3D and finish setting up the environment
		for the Java SDK.
		<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>	cd jdk
	tar -xvyf ~/java3d-1.2.1_01-fcs-linux-i386-sdk.tar.bz2
	cd jre/lib/ext
	cp j3d* ..
	cp vecmath.jar ..
	cd /usr/local
	chown -R root:root jdk1.3.1_02
        </PRE
></FONT
></TD
></TR
></TABLE
>
        </P
><P
>        Edit <TT
CLASS="FILENAME"
>/etc/profile</TT
> or, as on many systems,
		you can add a new file like <TT
CLASS="FILENAME"
>java.sh</TT
> to
		the directory <TT
CLASS="FILENAME"
>/etc/profile.d/</TT
>.
		To either file, add:
        <TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>			JAVA_HOME=/usr/local/jdk
			PATH=$PATH:$JAVA_HOME/bin
			MANPATH=$MANPATH:$JAVA_HOME/man
			export JAVA_HOME PATH MANPATH
        </PRE
></FONT
></TD
></TR
></TABLE
>
		If you used a separate file <TT
CLASS="FILENAME"
>java.sh</TT
>, remember to make it
		executable. Start a new login terminal for these changes to take affect.
		</P
><P
>        This completes the installation of the Java 2 SDK, which includes the JRE and the
        Java 3D extension.
        </P
><P
>        You can install the Java PlugIn for <B
CLASS="COMMAND"
>netscape</B
>:
        <TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>	# go to where netscape is installed
	cd $MOZILLA_HOME
	cd plugins
	ln -s /usr/local/jdk/jre/plugin/i386/ns600/libjavaplugin_oji.so libjavaplugin_oji.so
	# This installs it globally for all users
	# Each user can run ControlPanel to customize the Java Plugin preferences.
	ControlPanel
	# Then try it out:
	netscape &#38;
        </PRE
></FONT
></TD
></TR
></TABLE
>
        When netscape loads, go to
		<SPAN
CLASS="GUIMENU"
>Edit</SPAN
>+<SPAN
CLASS="GUIMENU"
>Preferences</SPAN
>-&gt;<SPAN
CLASS="GUIMENUITEM"
>Advanced</SPAN
> and Enable Java and Enable Java Plugin, then
        exit Netscape.
        </P
><P
>        Test Java 3D demos:
        <TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>&#13;                cd $JAVA_HOME/demo/java3d/GearTest
                java GearBox &#38;
                # runs as normal java application
                netscape GearBox_plugin.html &#38;
                # runs in netscape as an applet
        </PRE
></FONT
></TD
></TR
></TABLE
>
        </P
><P
>	If you experience trouble with Java, you can try deleting <TT
CLASS="FILENAME"
>~/.java</TT
>
	and related files in your home directory, then try again.  These files left over from
	a prior Java installation can cause problems.
	</P
><P
>        If all works well, you should have a complete Java Developement and Runtime Environment for
        both normal apps and high-performance 3D apps.
        See <A
HREF="http://java.sun.com/"
TARGET="_top"
>http://java.sun.com/</A
> for further information
        about Java and the Java 3D extension.
        </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="instglut.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="fincomm.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Install GLUT 3.7 Distribution (optional)</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="install.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Final Comments</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>