From Fedora Project Wiki
No edit summary
No edit summary
Line 11: Line 11:




* If you came here because an application ask for Java (or JRE, JVM) to be installed, then simply install {{package|Java}}.
* If you came here because an application ask for Java (or JRE, JVM) to be installed, then simply install {{package|java-1.8.0-openjdk}}.
* If it still does not work or the application ask specifically for ''Oracle Java'': See here [[Oracle version]].
* If it still does not work or the application ask specifically for ''Oracle Java'': See here [[Oracle version]].
* If you want to develop, code, on the Java Platform: See [[User:Brunovernay/Java/Development]]. ('''Careful to change the link for production''')
* If you want to develop, code, on the Java Platform: See [[User:Brunovernay/Java/Development]]. ('''Careful to change the link for production''')
Line 20: Line 20:
Some vocabulary:
Some vocabulary:


* '''JRE''' Java Runtime Environment. Required to run Java code and applications. Install {{package|Java}}.
* '''JRE''' Java Runtime Environment. Required to run Java code and applications. Install {{package|java-1.8.0-openjdk}}.
* '''JVM''' Java Virtual Machine. Main component of the JRE.
* '''JVM''' Java Virtual Machine. Main component of the JRE.
* '''JDK''' Java Development Kit.  Required only for development, coding.
* '''JDK''' Java Development Kit.  Required only for development, coding.
Line 31: Line 31:
== Multiple implementations ==
== Multiple implementations ==


Fedora provides the Free OpenJDK {{package|Java}}. If this Open Source stack does not fulfil your requirements. Alternatives can be installed alongside or separately.
Fedora provides the Free {{package|java-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.
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.
Line 63: Line 63:


= Java packages in Fedora =
= 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 <pre>dnf repoquery --provides java-1.8.0-openjdk</pre>.
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
<pre>dnf install java-1.8.0-openjdk</pre> might be the most safe (until 1.8 is EOL.)
For debugging or development, there are
* java-devel
* java-src
* java-javadoc
* openjfx (JavaFX)
* openjfx-devel
* openjfx-javadoc
* openjfx-src
???


* JavaFX (?) JavaFX is supposed to be merged in Java 8. Why is there a specific package??
* JavaFX (?) JavaFX is supposed to be merged in Java 8. Why is there a specific package??

Revision as of 17:12, 13 July 2017

Proposed new Java page. See this "discussion" for the rationale.

Java

Java is about:


  • If you came here because an application ask for Java (or JRE, JVM) to be installed, then simply install java-1.8.0-openjdk.
  • If it still does not work or the application ask specifically for Oracle Java: See here Oracle version.
  • If you want to develop, code, on the Java Platform: See User:Brunovernay/Java/Development. (Careful to change the link for production)


JRE JDK JVM JSE ...

Some vocabulary:

  • JRE Java Runtime Environment. Required to run Java code and applications. Install java-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.


Multiple implementations

Fedora provides the Free java-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 [alternative] 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 RPM packages: https://java.com/en/download/help/linux_rpm.xml

...


Switching alternatives

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.


https://fedoraproject.org/wiki/Packaging:Alternatives

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.)


For debugging or development, there are

  • java-devel
  • java-src
  • java-javadoc
  • openjfx (JavaFX)
  • openjfx-devel
  • openjfx-javadoc
  • openjfx-src
???
  • JavaFX (?) JavaFX is supposed to be merged in Java 8. Why is there a specific package??

(Useful here ????)


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