From Fedora Project Wiki
Line 92: Line 92:




* [https://bugzilla.redhat.com/buglist.cgi?component=java-1.8.0-openjdk&product=Fedora&bug_status=NEW&bug_status=ASSIGNED&bug_status=MODIFIED&bug_status=ON_DEV&bug_status=ON_QA&order=bugs.votes,bugs.bug_id Bugzilla java-1.8.0-openjdk]
* [https://bugzilla.redhat.com/buglist.cgi?component=java-1.8.0-openjdk&product=Fedora&bug_status=NEW&bug_status=ASSIGNED&bug_status=MODIFIED&bug_status=ON_DEV&bug_status=ON_QA&order=bugs.votes,bugs.bug_id Java-1.8.0-OpenJDK bugs]


* [[SIGs/Java]]
* [[SIGs/Java]]

Revision as of 14:28, 30 August 2017

Proposed new Java page NOT finished yet!'. See this "discussion" for the rationale.

Java

Java is about:


What do you want to do:


JRE JDK JVM JSE ...

Some vocabulary, if you are lost:

  • JRE Java Runtime Environment. Required to run Java code and applications. Install Package-x-generic-16.pngjava-1.8.0-openjdk.
  • JVM Java Virtual Machine. Main component of the JRE.
  • JDK Java Development Kit. Required only for development, coding.
  • SDK Software Development Kit. idem JDK
  • OpenJDK Open Source project behind the Java Platform http://openjdk.java.net/.
  • IcedTea is a support project for OpenJDK (concern only developers) http://icedtea.classpath.org/
  • JSE, J2SE, JEE ... obsolete acronyms for Java Standard & Enterprise Edition. JavaSE is like JRE.


What is in Java OpenJDK package

For most users, it is just another system library. It is not an application with a GUI, but it is required by some other applications to run. You might see a OpenJDK Policy tool desktop application that comes with the package, but you should not have to use it.

Multiple implementations

Fedora provides the Free Package-x-generic-16.pngjava-1.8.0-openjdk. If this Open Source stack does not fulfil your requirements. Alternatives can be installed alongside or separately.

The Java Community Process defines the specifications of the platform that many implements (IBM J9, Jikes, Zing, Zulu Dalvik ...). We will only focus on Oracle here.

Multiple implementations can be installed side-by-side without interfering:

  • The alternatives system allows to switch from one to another.
  • An application can directly reference a specific Java installation
  • Some applications include a java platform, it is then transparent for the user. (But the package is bigger.)

Oracle version

Some applications still ask for Oracle's implementation. It is mostly based on the OpenJDK Open Source project, but there is proprietary code and Fedora does not package non-free software.

Oracle provides the tarball: https://java.com/en/download/help/linux_x64_install.xml

...

Switching alternatives

If you installed multiple Java implementations or version, you can configure your system to use one or another.

Switching is done using the alternatives system (also used to change some other subsystems). Java's subsystem name is surprisingly java and typical commands include:

# alternatives --display java
# alternatives --config java

See alternative's own documentation for more information for usage and parts involved.

Should be noted that JRE implementations installed outside Fedora distribution, may not support alternatives and thus not be visible there. Then the symbolic links under directory /etc/alternatives must be manually fixed.

Java packages in Fedora

There are many aliases for OpenJDK package, see http://pkgs.fedoraproject.org/cgit/rpms/java-1.8.0-openjdk.git/tree/java-1.8.0-openjdk.spec or do

dnf repoquery --provides java-1.8.0-openjdk

.

You can use any of the following names:

  • java
  • java-1.8.0
  • java-1.8.0-openjdk
  • java-openjdk
  • jre
  • jre-1.8.0
  • jre-1.8.0-openjdk
  • jre-openjdk


dnf install java-1.8.0-openjdk

might be the most safe (until 1.8 is EOL.)

Communicate

You can subscribe to java-devel list or talk to us in #fedora-java Freenode IRC channel. Read Communicate page for more information.

See Also


References