NativeJava

Like other Java runtimes, libgcj can load classes from bytecode class files. Unlike other Java runtimes, libgcj can also load classes that have been compiled to native machine code using GCJ. As you might expect, code sourced from native classes executes much faster than code sourced from bytecode classes.

Many of the Java packages in Fedora contain native code in addition to the usual bytecode. If you have a package that doesn't, then adding it is simple.


 * For packages in which all jarfiles are in the main package:

1. Remove the following if present: BuildArch: noarch 2. Add the following dependencies: BuildRequires:   java-gcj-compat-devel >= 1.0.31 Requires(post):  java-gcj-compat >= 1.0.31 Requires(postun): java-gcj-compat >= 1.0.31 3. Add the following to the end of  section: %{_bindir}/aot-compile-rpm 4. If the package has no  section then add the following after the   section: %post if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi If the package does have a  section then just add the   line to it. 5. If the package has no  section then add the following after the   section: %postun if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi If the package does have a  section then just add the   line to it. 6. Add the following to the  section: %attr(-,root,root) %{_libdir}/gcj/%{name}


 * For packages in which all jarfiles are in one subpackage the,  ,   and   lines should refer to that subpackage.

%attr(-,root,root) %{_libdir}/gcj/%{name}/foo-x.y.z.jar.* Note that the path has been stripped and  has been appended.
 * For packages in which more than one subpackage (including the main package) contains jarfiles then each subpackage should have its own,   and   lines, and the   lists should be split such that the subpackage that contains   should have the following   line:

(These instructions extend and replace the earlier aot-compile-rpm HOWTO .)