Brunovernay (talk | contribs) |
Brunovernay (talk | contribs) (Explain straightforward install) |
||
Line 1: | Line 1: | ||
= Java on Fedora = | = Java on Fedora = | ||
Fedora uses a Free software stack that consists of [http://en.wikipedia.org/wiki/Openjdk OpenJDK] and IcedTea. Refer to our [[Java/FAQ]] for more information on that. Software mentioned on this page may come in different packaging formats. Fedora's own packages (''RPM'') are easy to install | Fedora uses a Free software stack that consists of [http://en.wikipedia.org/wiki/Openjdk OpenJDK] and IcedTea. Refer to our [[Java/FAQ]] for more information on that. Software mentioned on this page may come in different packaging formats. | ||
Fedora's own packages (''RPM'') are easy to install with [[Dnf]]. As simple as "<code>sudo dnf install java</code>". | |||
Third party packages may be in archive formats (.zip, tar) for which case-specific instructions should be provided. | |||
= Terminology = | = Terminology = |
Revision as of 08:43, 20 June 2017
Java on Fedora
Fedora uses a Free software stack that consists of OpenJDK and IcedTea. Refer to our Java/FAQ for more information on that. Software mentioned on this page may come in different packaging formats.
Fedora's own packages (RPM) are easy to install with Dnf. As simple as "sudo dnf install java
".
Third party packages may be in archive formats (.zip, tar) for which case-specific instructions should be provided.
Terminology
In Java context, terms may be a bit confusing for newcomers. JRE (Java Runtime Environment) stands for virtual machine, which is able to run Java programs.
JDK (Java Development Kit) or SDK (Software Development Kit) is needed to develop Java programs. Many SDK packages these days also ship JRE, or to confuse more, no separate JRE is provided and thus terminal installations are supposed to include the development environment.
Terms AOT (Ahead of Time]), SE, J2EE need some more explanation.
Java Runtime Environments (JRE)
Java has different JRE implementations and wide variety of combinations which work together. Different implementations can be installed simultaneously to Fedora and activated one at a time. Activation 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.
OpenJDK and project IcedTea
Fedora has shipped OpenJDK as default JRE implementation. It is based on Sun Microsystem's/Oracle's JavaOne open source release and complemented by Red Hat's IcedTea project that implements the missing third party components that Sun/Oracle could not release under free License.
OpenJDK's java.library.path, shared library paths for i386 are:
/usr/lib /usr/lib/jvm/java-1.?.0-openjdk-1.?.0.0.x86_64/jre/lib/
and for x86_64:
/usr/lib64 /usr/lib/jvm/java-1.?.0-openjdk-1.?.0.0.x86_64/jre/lib/amd64/
OpenJDK package name on Fedora is java-1.?.0-openjdk.
Oracle's Java SE
Original Oracle's Java SE (Standard Edition) can be downloaded directly from http://www.java.com/en/download/ and installed manually.
You're, however, encouraged to try out the OpenJDK runtime first.
Troubleshooting JRE
Fedora's JRE in browser environment can be tested using the following test pages:
- http://www.java.com/en/download/help/testvm.xml
- http://java.com/en/download/installed.jsp?detect=jre&try=1
If these don't work, proceed with Java/Troubleshooting page.
Java Development Tools (SDK)
The following SDKs are listed in alphabetic order.
Eclipse
See our Eclipse page for an integrated development environment platform that itself is written in Java and has plugin support for many programming languages.
IntelliJ IDEA
IntelliJ IDEA is considered by many the ultimate Java development environment. A commercial project for many years, IntelliJ IDEA became open-source in 2009 by releasing the IntelliJ IDEA Community Edition. IntelliJ is written in Java, features a portable Swing UI and is extensible via plugins.
Maven
Fedora includes a somewhat customized version of Maven in the distribution. The customization is purely to make Maven work well in offline mode with the rest of the system. Details on how packagers can use this customized Maven are located here . Generally the latest stable Maven version is shipped. Also related to maven, a feasibility study is being performed to change the installation of Java packages to become a valid maven repository. It will make it easier to support parallel installation of either "legacy" or "progressive" versions of Java packages. Once some positive results are obtained, it will be discussed on the fedora-devel-java-list. Maven itself is no longer patched to add support for Fedora's file layout but a pristine copy is shipped. Customizations are done via the XMvn project. It is recommended to install maven-local rpm which will bring in xmvn as dependency but will also install some other helper scripts and customizations for Fedora.
NetBeans IDE
The "reference" Java IDE, developed for many years by Sun(now Oracle). NetBeans is written in Java, features a portable Swing UI, out of the box support for many Java tools and frameworks and it's extensible via plugins.
Java Server Side Environments
Apache Tomcat
Fedora ships Apache Tomcat as part of standard distribution.
Apache Tomcat package name on Fedora is tomcat and is currently at version 7.x.
JBoss AS
The Java SIG is working on packaging JBoss AS 7, along with a minimal set of required JARs, to make this open-source Java EE application server available as a service in Fedora.
You can learn more about the effort and the current progress on the JBoss AS 7 on Fedora page.
Talking points about JBoss AS 7 on Fedora 17 are available and are used to create marketing cards and information sheets.
Teaching and Learning Java
As part of planning and implementing new 100% FLOSS Java components into Fedora, this draft document has been opened to give developers a place to teach each other about best practices, patterns, etc.
Open Issues with Java packages
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
- Java/FAQ
- Java/Troubleshooting
- Java/PKIAppletCompatibility
- Java/StackTraces
- Java/JPPMavenReadme
- Java/FedoraJavaMarketingBrief
- Docs/Drafts/JavaProgramming
- Packaging:Java
- JDK_on_Fedora
- Developer.FedoraProject.Org/Java
- SIGs/Java