From Fedora Project Wiki

(damn, missed saving these changes somehow, or there was a browser crash .. thanks It's All Text plugin for having backup files.)
Line 1: Line 1:
==Java==
==Java==


=== Best of Breed Free Software Java implementation ===
=== Best of breed free software Java implementation ===


Fedora includes best of breed free software java implementations through active adoption of innovative Fedora and upstream technology integration. The implementations integrated into Fedora are based on [http://openjdk.java.net/ OpenJDK] and the [http://icedtea.classpath.org/ IcedTea] GNU/Linux distribution integration project or alternatives like the GNU Compiler for Java ([http://gcc.gnu.org/java GCJ]) and the [http://www.gnu.org/software/classpath/ GNU Classpath] core class libraries. All Fedora innovations are pushed upstream to get the widest possible integration of the technologies in general Java implementations.
Fedora includes multiple best of breed free software Java(TM) implementations, obtained through active adoption of innovative technology integrations produced by Fedora and others within upstream projects. The implementations integrated into Fedora are based on OpenJDK (http://openjdk.java.net/) and the IcedTea GNU/Linux distribution integration project (http://icedtea.classpath.org/), or based on alternatives such as the GNU Compiler for Java (GCJ - http://gcc.gnu.org/java) and the GNU Classpath core class libraries (http://www.gnu.org/software/classpath/). All Fedora innovations are pushed upstream to get the widest possible integration of the technologies in general Java implementations.


The implementation of OpenJDK 6 included in Fedora 10 uses the HotSpot virtual machine runtime compiler on x86, x86_64 and sparc. On ppc it uses the zero interpreter (which is a bit slower). On all architectures an alternative implementation based on GCJ and GNU Classpath is included which includes a ahead of time compiler to produce native binaries.
The implementation of OpenJDK 6 included in Fedora 10 uses the HotSpot virtual machine runtime compiler on x86, x86_64, and SPARC. On PowerPC (PPC) it uses the zero interpreter, which is slower. On all architectures an alternative implementation based on GCJ and GNU Classpath is included that includes an ahead-of-time compiler to produce native binaries.


Fedora binaries for selected architectures (currently only x86 and x86_64 based on OpenJDK) are tested against the Java Compatibility Kit (JCK) by Red Hat to guarantee 100% compatibility with the Java Specification (JDK 1.6 at this time).
Fedora binaries for selected architectures (currently only x86 and x86_64 based on OpenJDK) are tested against the Java Compatibility Kit (JCK) by Red Hat to guarantee 100% compatibility with the Java Specification (JDK 1.6 at this time).
Line 11: Line 11:
=== Handling Java Applets and Web Start Applications ===
=== Handling Java Applets and Web Start Applications ===


In Fedora 10 <code>gcjwebplugin</code> has been replaced by <code>IcedTeaPlugin</code> that runs untrusted applets safely in a Web browser. You can see which Applet Plugin is installed by typing <code>about:plugins</code> in firefox. The new plugin adds support for the JavaScript bridge (LiveConnect) which was missing from earlier versions [https://bugzilla.redhat.com/show_bug.cgi?id=304021 bytecode-to-JavaScript bridge (LiveConnect)]. The plugin works on any architecture.
In Fedora 10 <code>gcjwebplugin</code> has been replaced by <code>IcedTeaPlugin</code> that runs untrusted applets safely in a Web browser and works on any architecture. You can see which Applet Plugin is installed by typing <code>about:plugins</code> in Firefox. The new plugin adds support for the JavaScript bridge (LiveConnect) that was missing from earlier versions. For more details on "bytecode-to-JavaScript bridge (LiveConnect)", refer to the bug report:


Feedback on the security policy is much appreciated. If you suspect the security policy may be too restrictive to enable restricted applets, then run the <code>firefox -g</code> command in a terminal window to see what is being restricted, and then grant the restricted permission in the <code>/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/security/java.policy</code> file and/or report a bug.
https://bugzilla.redhat.com/show_bug.cgi?id=304021


Experimental Web Start (<code>javaws</code>) support via [http://jnlp.sourceforge.net/ NetX] has been added to the IcedTea repository. When a Java Network Launching Protocol (<code>.jnlp</code>) file is embedded on a web page you can open it with the IcedTea Web Start (<code>/usr/bin/javaws</code>).
Feedback on the security policy is very appreciated. If you suspect the security policy may be too restrictive to enable restricted applets, run the <code>firefox -g</code> command in a terminal window to see what is being restricted, then grant the restricted permission in the <code>/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/security/java.policy</code> file.  If you then file a bug report, your exception could end up in the packaged security policy and you won't have to hack the policy file in the future.
 
Experimental Web Start (<code>javaws</code>) support via NetX has been added to the IcedTea repository. When a Java Network Launching Protocol (<code>.jnlp</code>) file is embedded on a web page you can open it with the IcedTea Web Start (<code>/usr/bin/javaws</code>).
 
http://jnlp.sourceforge.net/ -- NetX


=== New integration with other Fedora technologies ===
=== New integration with other Fedora technologies ===


Through the IcedTea project OpenJDK has been integrated with a couple of new technologies that are also part of Fedora 10:
Through the IcedTea project OpenJDK has been integrated with several new technologies that are also part of Fedora 10.


==== VisualVM integration through the NetBeans framework ====
==== VisualVM integration through the NetBeans framework ====


VisualVM (<code>jvisualvm</code>) provides a graphical overview of any local or remotely running java application and lets you monitor all running threads, classes and objects allocated by the application by taking thread dumps and heap dumps and other lightweight profiling tools.
VisualVM (<code>jvisualvm</code>) provides a graphical overview of any local or remotely running Java application, letting you monitor all running threads, classes, and objects allocated by the application by taking thread dumps, heap dumps, and other lightweight profiling tools.


==== PulseAudio integration for javax.sound ====
==== PulseAudio integration for javax.sound ====
Line 29: Line 33:
PulseAudio integrations provides all the benefits of PulseAudio to any java application using the <code>javax.sound</code> package.
PulseAudio integrations provides all the benefits of PulseAudio to any java application using the <code>javax.sound</code> package.


==== Integration of Mozilla Rhino (javascript) ====
==== Integration of Mozilla Rhino (JavaScript) ====


Rhino is a pure java javascript implementation from Mozilla providing easy mixing of Java and JavaScript for developers using the <code>javax.script</code> package.
Rhino is a pure-Java JavaScript implementation from Mozilla providing an easy mixing of Java and JavaScript for developers using the <code>javax.script</code> package.


==== Other improvements ====
==== Other improvements ====
Line 39: Line 43:
=== Fedora and JPackage ===
=== Fedora and JPackage ===


Fedora 10 includes many packages derived from the [http://jpackage.org JPackage Project] .  Some of these packages are modified in Fedora to remove proprietary software dependencies, and to make use of GCJ's ahead-of-time compilation feature.  Use the Fedora repositories to update these packages, or use the JPackage repository for packages not provided by Fedora.  Refer to the [http://jpackage.org JPackage websitefor more information about the project, and the software it provides.
Fedora 10 includes many packages derived from the JPackage Project.
 
http://jpackage.org
 
Some of these packages are modified in Fedora to remove proprietary software dependencies, and to make use of GCJ's ahead-of-time compilation feature.  Use the Fedora repositories to update these packages, or use the JPackage repository for packages not provided by Fedora.  Refer to the JPackage website for more information about the project and the software it provides.


Admonition("warning", "Mixing Packages from Fedora and JPackage", "Research package compatibility before you install software from both the Fedora and JPackage repositories on the same system.  Incompatible packages may cause complex issues.")
Admonition("warning", "Mixing Packages from Fedora and JPackage", "Research package compatibility before you install software from both the Fedora and JPackage repositories on the same system.  Incompatible packages may cause complex issues.")
Line 45: Line 53:
=== Note on upgrading from Fedora 8 - OpenJDK Replaces IcedTea ===
=== Note on upgrading from Fedora 8 - OpenJDK Replaces IcedTea ===


Since Fedora 9 the packages called <code>java-1.7.0-icedtea*</code> in Fedora 8 have been renamed to <code>java-1.6.0-openjdk*</code>. The Fedora 8 IcedTea packages tracked the unstable OpenJDK 7 branch, whereas the <code>java-1.6.0-openjdk*</code> packages track the stable OpenJDK 6 branch. All the upstream IcedTea sources are included in the java-1.6.0-openjdk SRPM.
Since Fedora 9 the packages called <code>java-1.7.0-icedtea*</code> in Fedora 8 have been renamed to <code>java-1.6.0-openjdk*</code>. The Fedora 8 IcedTea packages tracked the unstable OpenJDK 7 branch, whereas the <code>java-1.6.0-openjdk*</code> packages track the stable OpenJDK 6 branch. All the upstream IcedTea sources are included in the <code>java-1.6.0-openjdk</code> SRPM.


If you are upgrading from a system based on Fedora 8 that still has IcedTea installed, the package changeover does not happen automatically.  The packages related to IcedTea based on OpenJDK 7 must first be erased, then the new OpenJDK 6 packages installed.
If you are upgrading from a system based on Fedora 8 that still has IcedTea installed, the package changeover does not happen automatically.  The packages related to IcedTea based on OpenJDK 7 must first be erased, then the new OpenJDK 6 packages installed.


<pre>
<pre>
su -c "yum erase java-1.7.0-icedtea{,-plugin}"
su -c 'yum erase java-1.7.0-icedtea{,-plugin}'
su -c "yum install java-1.6.0-openjdk{,-plugin}"
su -c 'yum install java-1.6.0-openjdk{,-plugin}'
</pre>
</pre>


Upgrading from Fedora 9 doesn't need any special action.
Upgrading from Fedora 9 does not require special action.

Revision as of 18:07, 13 October 2008

Java

Best of breed free software Java implementation

Fedora includes multiple best of breed free software Java(TM) implementations, obtained through active adoption of innovative technology integrations produced by Fedora and others within upstream projects. The implementations integrated into Fedora are based on OpenJDK (http://openjdk.java.net/) and the IcedTea GNU/Linux distribution integration project (http://icedtea.classpath.org/), or based on alternatives such as the GNU Compiler for Java (GCJ - http://gcc.gnu.org/java) and the GNU Classpath core class libraries (http://www.gnu.org/software/classpath/). All Fedora innovations are pushed upstream to get the widest possible integration of the technologies in general Java implementations.

The implementation of OpenJDK 6 included in Fedora 10 uses the HotSpot virtual machine runtime compiler on x86, x86_64, and SPARC. On PowerPC (PPC) it uses the zero interpreter, which is slower. On all architectures an alternative implementation based on GCJ and GNU Classpath is included that includes an ahead-of-time compiler to produce native binaries.

Fedora binaries for selected architectures (currently only x86 and x86_64 based on OpenJDK) are tested against the Java Compatibility Kit (JCK) by Red Hat to guarantee 100% compatibility with the Java Specification (JDK 1.6 at this time).

Handling Java Applets and Web Start Applications

In Fedora 10 gcjwebplugin has been replaced by IcedTeaPlugin that runs untrusted applets safely in a Web browser and works on any architecture. You can see which Applet Plugin is installed by typing about:plugins in Firefox. The new plugin adds support for the JavaScript bridge (LiveConnect) that was missing from earlier versions. For more details on "bytecode-to-JavaScript bridge (LiveConnect)", refer to the bug report:

https://bugzilla.redhat.com/show_bug.cgi?id=304021

Feedback on the security policy is very appreciated. If you suspect the security policy may be too restrictive to enable restricted applets, run the firefox -g command in a terminal window to see what is being restricted, then grant the restricted permission in the /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/security/java.policy file. If you then file a bug report, your exception could end up in the packaged security policy and you won't have to hack the policy file in the future.

Experimental Web Start (javaws) support via NetX has been added to the IcedTea repository. When a Java Network Launching Protocol (.jnlp) file is embedded on a web page you can open it with the IcedTea Web Start (/usr/bin/javaws).

http://jnlp.sourceforge.net/ -- NetX

New integration with other Fedora technologies

Through the IcedTea project OpenJDK has been integrated with several new technologies that are also part of Fedora 10.

VisualVM integration through the NetBeans framework

VisualVM (jvisualvm) provides a graphical overview of any local or remotely running Java application, letting you monitor all running threads, classes, and objects allocated by the application by taking thread dumps, heap dumps, and other lightweight profiling tools.

PulseAudio integration for javax.sound

PulseAudio integrations provides all the benefits of PulseAudio to any java application using the javax.sound package.

Integration of Mozilla Rhino (JavaScript)

Rhino is a pure-Java JavaScript implementation from Mozilla providing an easy mixing of Java and JavaScript for developers using the javax.script package.

Other improvements

Also in Fedora 10 Java cryptography (javax.crypto) is fully supported without any (regional) restrictions.

Fedora and JPackage

Fedora 10 includes many packages derived from the JPackage Project.

http://jpackage.org

Some of these packages are modified in Fedora to remove proprietary software dependencies, and to make use of GCJ's ahead-of-time compilation feature. Use the Fedora repositories to update these packages, or use the JPackage repository for packages not provided by Fedora. Refer to the JPackage website for more information about the project and the software it provides.

Admonition("warning", "Mixing Packages from Fedora and JPackage", "Research package compatibility before you install software from both the Fedora and JPackage repositories on the same system. Incompatible packages may cause complex issues.")

Note on upgrading from Fedora 8 - OpenJDK Replaces IcedTea

Since Fedora 9 the packages called java-1.7.0-icedtea* in Fedora 8 have been renamed to java-1.6.0-openjdk*. The Fedora 8 IcedTea packages tracked the unstable OpenJDK 7 branch, whereas the java-1.6.0-openjdk* packages track the stable OpenJDK 6 branch. All the upstream IcedTea sources are included in the java-1.6.0-openjdk SRPM.

If you are upgrading from a system based on Fedora 8 that still has IcedTea installed, the package changeover does not happen automatically. The packages related to IcedTea based on OpenJDK 7 must first be erased, then the new OpenJDK 6 packages installed.

su -c 'yum erase java-1.7.0-icedtea{,-plugin}'
su -c 'yum install java-1.6.0-openjdk{,-plugin}'

Upgrading from Fedora 9 does not require special action.