Java

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Open Issues with Java packages)
(Open Issues with Java packages)
(44 intermediate revisions by 7 users not shown)
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], GNU Compiler for Java, GNU classpath and the Eclipse Java compiler to implement Java. See our [[JavaFAQ]]  for more information on that.  Note that AOT compilation using GCJ has been deprecated (made optional) and new packages or updated ones will be built with OpenJDK in a regular Java compilation to bytecodes.
+
Fedora uses a Free software stack that consists of [http://en.wikipedia.org/wiki/Openjdk OpenJDK], GNU Compiler for Java, GNU Classpath and the Eclipse Java compiler to provide Java support. See our [[Java/FAQ]]  for more information on that.  Note that AOT compilation using GCJ has been deprecated (made optional) and new or updated packages will be built using OpenJDK to produce regular Java bytecode.
 +
 
 +
Software mentioned on this page may come in different packaging formats. Fedora's own packages (''RPM'') are easy to install (''with [[Yum]]'') and installation instructions can be found from [[Docs/Drafts/SoftwareManagementGuide]]. 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 Developmenet 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''' (''[http://en.wikipedia.org/wiki/AOT_compiler Ahead of Time]]''), '''SE''', '''J2EE''' need some more explanation.
  
Software mentioned on this page may come in different packaging formats. Fedora's own packages (''RPM'') are easy to install (''with Yum'') and installation instructions can be found from [[Docs/Drafts/SoftwareManagementGuide]]. Third party packages may be in archive formats (.zip, tar) and then case specific instructions should be provided.
 
  
 
= Java Runtime Environments (JRE) =
 
= Java Runtime Environments (JRE) =
Line 17: Line 26:
 
== OpenJDK and project IcedTea ==
 
== OpenJDK and project IcedTea ==
 
Fedora has shipped OpenJDK as default JRE implementation since Fedora release 9. It's based on Sun Microsystem's [http://en.wikipedia.org/wiki/JavaOne JavaOne] open source release and complemented by Red Hat's [http://en.wikipedia.org/wiki/IcedTea IcedTea] project that implements the missing third party components that Sun could not release under free License.
 
Fedora has shipped OpenJDK as default JRE implementation since Fedora release 9. It's based on Sun Microsystem's [http://en.wikipedia.org/wiki/JavaOne JavaOne] open source release and complemented by Red Hat's [http://en.wikipedia.org/wiki/IcedTea IcedTea] project that implements the missing third party components that Sun could not release under free License.
 +
 +
OpenJDK's '''java.library.path''', shared librarary paths for i386 are:
 +
<pre>
 +
/usr/lib
 +
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/
 +
</pre>
 +
 +
and for x86_64:
 +
<pre>
 +
/usr/lib64
 +
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/
 +
</pre>
  
 
OpenJDK package name on Fedora is ''java-1.6.0-openjdk''.
 
OpenJDK package name on Fedora is ''java-1.6.0-openjdk''.
Line 26: Line 47:
  
  
== Sun Microsystems Java SE ==
+
== Oracle's Java SE ==
Original Sun Microsystem's Java SE (Standard Edition) can be downloaded directly from [http://www.java.com/en/download/ http://www.java.com/en/download/] and installed manually.
+
Original Oracle's Java SE (Standard Edition) can be downloaded directly from [http://www.java.com/en/download/ http://www.java.com/en/download/] and installed manually.
 +
 
 +
You're, however, encouraged to try out the OpenJDK runtime first.
 +
 
  
 
== Troubleshooting JRE ==
 
== Troubleshooting JRE ==
Line 35: Line 59:
 
* [http://java.com/en/download/installed.jsp?detect=jre&try=1 http://java.com/en/download/installed.jsp?detect=jre&try=1]
 
* [http://java.com/en/download/installed.jsp?detect=jre&try=1 http://java.com/en/download/installed.jsp?detect=jre&try=1]
  
 +
If these don't work, proceed with [[Java/Troubleshooting]] page.
  
'''Firefox''' detected plugin list can be seen by typing the url:
+
= Java Develoment Tools (SDK) =
<pre>about:plugins</pre>
+
  
Firefox can be run in debug mode as follows:
+
The following SDKs are listed in alphabetic order.
<pre>$ ICEDTEAPLUGIN_DEBUG=true firefox &lt;URL above&gt; 2>&1 | tee console.log
+
</pre>
+
This will write the standard output also to a file which can be attached to a bug reports.
+
 
+
OpenJDK does not ship the ''Java console'' anymore, but one can be found from Firefox [https://addons.mozilla.org/en-US/firefox/addon/60 Web Developer] add-on which is installed separately to the Firefox. Add-ons are installed using Firefox's own software component management system, not Fedora's RPM.
+
 
+
= Java Develoment Tools (SDK) =
+
  
 
== Eclipse ==
 
== 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.
 
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. It's part of the Fedora packages and can easily the installed with yum. IntelliJ is written in Java, features a portable Swing UI and is extensible via plugins.
  
 
== Maven ==
 
== 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 at [[Java/JPPMavenReadme]] . We are in the process of upgrading from maven2 2.0.4 to maven2 2.0.8 (ETA = F12).  Once that is achieved we will proceed immediately to maven2 2.0.9 and then to 2.0.10.  The reason for going by steps is that it is easier to bootstrap a maven2 release from the previous one.  Also related to maven2, a feasibility study is being performed to change the installation of Java packages to become a valid maven2 repository. We will no longer have to modify maven2 (not even with our small patch), and it wil be 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.
+
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 [http://sochotni.fedorapeople.org/java-packaging-howto/ 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 [https://github.com/mizdebsk/xmvn 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 =  
 
= Java Server Side Environments =  
Line 62: Line 87:
 
Fedora ships [http://en.wikipedia.org/wiki/Apache_Tomcat Apache Tomcat] as part of standard distribution.
 
Fedora ships [http://en.wikipedia.org/wiki/Apache_Tomcat Apache Tomcat] as part of standard distribution.
  
Apache Tomcat package name on Fedora is ''tomcat6''.
+
Apache Tomcat package name on Fedora is ''tomcat'' and is currently at version 7.x.
  
 +
== JBoss AS ==
 +
 +
The [[SIGs/Java|Java SIG]] is working on packaging [http://jboss.org/as7 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 [[JBossAS7|JBoss AS 7 on Fedora]] page.
 +
 +
[[JBossAS7_in_Fedora_marketing_collateral|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 =
 
= Teaching and Learning Java =
Line 74: Line 106:
  
 
= Open Issues with Java packages =
 
= Open Issues with Java packages =
* [https://bugzilla.redhat.com/buglist.cgi?component=java-1.6.0-openjdk&product=Fedora&bug_status=NEW&bug_status=ASSIGNED&bug_status=MODIFIED&bug_status=ON_DEV&bug_status=ON_QA openjdk-1.6.0]
+
* [https://bugzilla.redhat.com/buglist.cgi?component=java-1.7.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.6.0-openjdk]
 +
* [https://bugzilla.redhat.com/buglist.cgi?component=java-1.5.0-gcj&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.5.0-gcj]
 
* [https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora&component=azureus Azureus]  
 
* [https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora&component=azureus Azureus]  
 
* [https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora&component=erlang erlang]
 
* [https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora&component=erlang erlang]
 
* [https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora&component=itext itext]
 
* [https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora&component=itext itext]
* [https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora&component=jakarta-commons-cli jakarta-commons-cli]
 
 
* [https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora&component=jogl JOGL]
 
* [https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora&component=jogl JOGL]
 
* [https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora&component=kawa kawa]
 
* [https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora&component=kawa kawa]
Line 86: Line 118:
 
= Communicate =
 
= Communicate =
  
You can subscribe to [https://www.redhat.com/mailman/listinfo/fedora-devel-java-list fedora-devel-java-list] or talk to us in [irc://irc.freenode.net/fedora-java #fedora-java] Freenode IRC channel. Read [[Communicate]]  page for more information.
+
You can subscribe to [https://admin.fedoraproject.org/mailman/listinfo/java-devel java-devel list] or talk to us in [irc://irc.freenode.net/fedora-java #fedora-java] Freenode IRC channel. Read [[Communicate]]  page for more information.
  
 
= See Also =  
 
= See Also =  
* [[JavaFAQ]]
+
* [[Java/FAQ]]
* [[JavaStackTraces]]
+
* [[Java/Troubleshooting]]
 +
* [[Java/PKIAppletCompatibility]]
 +
* [[Java/StackTraces]]
 +
* [[Java/JPPMavenReadme]]
 +
* [[Java/FedoraJavaMarketingBrief]]
 +
* [[Docs/Drafts/JavaProgramming]]
 +
* [[Packaging:Java]]
 +
* [[SIGs/Java]]
  
 
= References =
 
= References =
 
* [http://openjdk.java.net/ OpenJDK Home]
 
* [http://openjdk.java.net/ OpenJDK Home]
* [https://bugs.openjdk.java.net/ OpenJDK Bug tracking system]
+
* [https://bugs.openjdk.java.net/ OpenJDK bug tracking system]
 +
* [http://icedtea.classpath.org/ IcedTea Home page]
 +
* [http://icedtea.classpath.org/bugzilla/ IcedTea bug tracking system]
 
* [http://tomcat.apache.org/ Apache Tomcat]
 
* [http://tomcat.apache.org/ Apache Tomcat]
 
* [http://java-source.net/open-source/web-servers Java web servers]
 
* [http://java-source.net/open-source/web-servers Java web servers]
 
* [http://en.wikipedia.org/wiki/JBoss_application_server JBoss application server]
 
* [http://en.wikipedia.org/wiki/JBoss_application_server JBoss application server]
 +
* [http://www.jboss.org/ JBoss Home page]
 +
* [http://www.redhat.com/magazine/012oct05/features/java/ Red Hat Magazine article about java from 2005]
 +
* [http://developer.classpath.org/ http://developer.classpath.org/]
 +
* [http://jpackage.org/ Jpackage.org]
 +
* [http://www.marketwire.com/press-release/Oracle-and-IBM-Collaborate-to-Accelerate-Java-Innovation-Through-OpenJDK-NASDAQ-ORCL-1332855.htm IBM joins to OpenJDK project]
 +
 +
[[Category:Java]]

Revision as of 06:59, 14 August 2013

Contents

Java on Fedora

Fedora uses a Free software stack that consists of OpenJDK, GNU Compiler for Java, GNU Classpath and the Eclipse Java compiler to provide Java support. See our Java/FAQ for more information on that. Note that AOT compilation using GCJ has been deprecated (made optional) and new or updated packages will be built using OpenJDK to produce regular Java bytecode.

Software mentioned on this page may come in different packaging formats. Fedora's own packages (RPM) are easy to install (with Yum) and installation instructions can be found from Docs/Drafts/SoftwareManagementGuide. 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 Developmenet 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's history is well known to consist different JRE implementations and wide variety of combinations which work together. Different implementations can be installed simultaneously to Fedora and activated one at the 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 since Fedora release 9. It's based on Sun Microsystem's JavaOne open source release and complemented by Red Hat's IcedTea project that implements the missing third party components that Sun could not release under free License.

OpenJDK's java.library.path, shared librarary paths for i386 are:

/usr/lib
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/

and for x86_64:

/usr/lib64
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/

OpenJDK package name on Fedora is java-1.6.0-openjdk.

GNU GCJ+GIJ for Java

The GNU Project's Java compiler and interpreter implementations provide a working JRE environment. GCJ is a Java compiler that produces bytecode for Java virtual machine GIJ.

GCJ JRE package on Fedora is java-1.5.0-gcj.


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:

If these don't work, proceed with Java/Troubleshooting page.

Java Develoment 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. It's part of the Fedora packages and can easily the installed with yum. 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.

Docs/Drafts/JavaProgramming


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

References