old-www/LDP/www.debian.org/doc/manuals/debian-java-faq/ch5.html

158 lines
6.6 KiB
HTML
Raw Permalink Blame History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Debian Java FAQ. - Managing Java (for users and administrators)</title>
<link href="index.html" rel="start">
<link href="ch4.html" rel="prev">
<link href="ch6.html" rel="next">
<link href="index.html#contents" rel="contents">
<link href="index.html#copyright" rel="copyright">
<link href="ch1.html" rel="chapter" title="1 Introduction">
<link href="ch-debian-java-lenny.html" rel="chapter" title="2 Status of Java in Debian GNU/Linux 5.0 (Lenny)">
<link href="ch-debian-java-squeeze.html" rel="chapter" title="3 Status of Java in Debian Squeeze">
<link href="ch4.html" rel="chapter" title="4 Java Development">
<link href="ch5.html" rel="chapter" title="5 Managing Java (for users and administrators)">
<link href="ch6.html" rel="chapter" title="6 Java Virtual Machines (JVM)">
<link href="ch-browser-java.html" rel="chapter" title="7 Java Plugins for Browsers">
<link href="ch8.html" rel="chapter" title="8 Java Servlets">
<link href="ch9.html" rel="chapter" title="9 Java Policy">
<link href="ch10.html" rel="chapter" title="10 Other Java alternatives for Debian">
<link href="ch1.html#s1.1" rel="section" title="1.1 Introduction to this FAQ">
<link href="ch1.html#s1.2" rel="section" title="1.2 Location of this FAQ">
<link href="ch1.html#s-bugs" rel="section" title="1.3 Sending bugs on this FAQ">
<link href="ch1.html#s1.4" rel="section" title="1.4 What is Java?">
<link href="ch1.html#s1.5" rel="section" title="1.5 Where can I ask questions about Java on Debian?">
<link href="ch1.html#s-moreinfo" rel="section" title="1.6 Complementary information">
<link href="ch1.html#s-pending" rel="section" title="1.7 Uncovered issues">
<link href="ch-debian-java-lenny.html#s2.1" rel="section" title="2.1 What is new in Lenny?">
<link href="ch-debian-java-squeeze.html#s3.1" rel="section" title="3.1 What is new in Squeeze?">
<link href="ch-debian-java-squeeze.html#s3.2" rel="section" title="3.2 What are the most important changes in the Java policy?">
<link href="ch-debian-java-squeeze.html#s3.3" rel="section" title="3.3 What have been removed in Squeeze?">
<link href="ch4.html#s4.1" rel="section" title="4.1 What full-fledged Java development platforms are available in Debian?">
<link href="ch4.html#s-free" rel="section" title="4.2 What free platforms are there and how can I contribute?">
<link href="ch4.html#s-license-concerns" rel="section" title="4.3 Questions on platforms and license concerns">
<link href="ch4.html#s4.4" rel="section" title="4.4 Making Debian packages for Java programs.">
<link href="ch6.html#s6.1" rel="section" title="6.1 What JVMs are available in Debian?">
<link href="ch6.html#s6.2" rel="section" title="6.2 What Java Compilers are available in Debian?">
<link href="ch6.html#s6.3" rel="section" title="6.3 What API do these JVMs provide?">
<link href="ch6.html#s6.4" rel="section" title="6.4 Are there known problems?">
<link href="ch6.html#s6.5" rel="section" title="6.5 Do I need a JVM to run a Java program in Debian?">
<link href="ch8.html#s8.1" rel="section" title="8.1 How can I make Java servlets work?">
<link href="ch9.html#s9.1" rel="section" title="9.1 Is there a Java policy for Debian?">
<link href="ch9.html#s9.2" rel="section" title="9.2 Are there holes in the Java Policy?">
<link href="ch10.html#s10.1" rel="section" title="10.1 Java programs not yet available on Debian">
<link href="ch4.html#s-java56" rel="subsection" title="4.3.1 Java 5 and 6">
<link href="ch4.html#s-openjdk" rel="subsection" title="4.3.2 Sun's OpenJDK">
<link href="ch4.html#s4.4.1" rel="subsection" title="4.4.1 Can the package go into main?">
<link href="ch4.html#s4.4.2" rel="subsection" title="4.4.2 Is there a good example Debian package?">
<link href="ch4.html#s4.4.3" rel="subsection" title="4.4.3 What tools are available to make maintaining a Java packages easier?">
<link href="ch4.html#s4.4.4" rel="subsection" title="4.4.4 Linking package Javadoc to system javadoc.">
<link href="ch6.html#s6.5.1" rel="subsection" title="6.5.1 How do I compile to native code?">
</head>
<body>
<p><a name="ch5"></a></p>
<hr>
<p>
[ <a href="ch4.html">previous</a> ]
[ <a href="index.html#contents">Contents</a> ]
[ <a href="ch1.html">1</a> ]
[ <a href="ch-debian-java-lenny.html">2</a> ]
[ <a href="ch-debian-java-squeeze.html">3</a> ]
[ <a href="ch4.html">4</a> ]
[ 5 ]
[ <a href="ch6.html">6</a> ]
[ <a href="ch-browser-java.html">7</a> ]
[ <a href="ch8.html">8</a> ]
[ <a href="ch9.html">9</a> ]
[ <a href="ch10.html">10</a> ]
[ <a href="ch6.html">next</a> ]
</p>
<hr>
<h1>
Debian Java FAQ.
<br>Chapter 5 - Managing Java (for users and administrators)
</h1>
<hr>
<p>
By default Java programs shipped with Debian will use the java in PATH. Some
of them may respect the JAVA_HOME variable (usually only if upstream supports
this) or have command line arguments to select a different java implementation.
</p>
<p>
Unfortunately not all java implementations work as well as others. So some
times it may be necessary to change the current java and Debian provides an
easy way to change the default java in PATH by using update-java-alternatives
(from the <code>java-common</code>). Some examples of how to do this are:
</p>
<pre>
# List available java implementations
$ update-java-alternatives --list
# Use openjdk-6
$ update-java-alternatives --set java-6-openjdk
# Use the non-free sun java.
$ update-java-alternatives --set java-6-sun
# Use the non-free sun java only for the web plugin
$ update-java-alternatives --plugin --set java-6-sun
</pre>
<p>
For more information, please read the manpage (or the --help output) of
update-java-alternatives. Also please note that update-java-alternatives is a
frontend for update-alternatives.
</p>
<hr>
<p>
[ <a href="ch4.html">previous</a> ]
[ <a href="index.html#contents">Contents</a> ]
[ <a href="ch1.html">1</a> ]
[ <a href="ch-debian-java-lenny.html">2</a> ]
[ <a href="ch-debian-java-squeeze.html">3</a> ]
[ <a href="ch4.html">4</a> ]
[ 5 ]
[ <a href="ch6.html">6</a> ]
[ <a href="ch-browser-java.html">7</a> ]
[ <a href="ch8.html">8</a> ]
[ <a href="ch9.html">9</a> ]
[ <a href="ch10.html">10</a> ]
[ <a href="ch6.html">next</a> ]
</p>
<hr>
<p>
Debian Java FAQ.
</p>
<address>
$Revision: 7831 $, $Date: 2010-12-04 20:17:15 +0000 (Sat, 04 Dec 2010) $<br>
<br>
Torsten Werner <code><a href="mailto:twerner@debian.org">twerner@debian.org</a></code><br>
Niels Thykier <code><a href="mailto:niels@thykier.net">niels@thykier.net</a></code><br>
Javier Fern<72>ndez-Sanguino Pe<50>a <code><a href="mailto:jfs@debian.org">jfs@debian.org</a></code><br>
<br>
</address>
<hr>
</body>
</html>