source: npl/java/openjdk/README.txt @ 551a8d2

Last change on this file since 551a8d2 was 981dbbc, checked in by Edwin Eefting <edwin@datux.nl>, 7 years ago

build openjdk, not used yet

  • Property mode set to 100644
File size: 5.9 KB
Line 
1Creating an OpenJDK (and OpenJRE) package for Slackware
2=======================================================
3
4In this directory you will find everything I used to create packages
5for OpenJDK's JRE and JDK as an alternative to Oracle's binary-only releases
6of Java.  Oracle no longer allows these binaries to be included with OS
7distributions, so Slackware will no longer provide updates for them.
8Build instructions for OpenJDK are provided further down in this README.
9
10Or, you can just install my pre-compiled packages which I *also* provide!
11
12If you want to install and just use my pre-built packages, then all you
13really need is "icedtea-web" which is the browser plugin, and one of
14the "openjdk" or "openjre" packages, depending of course on whether you
15need the full Java compiler suite or only the Java Runtime Environment.
16A separate "rhino" package is no longer needed because Java 8 contains
17its own JavaScript engine implementation now.
18
19You will also need to install apache-ant if you want to compile OpenJDK
20yourself.  In the past, xalan and xerces were needed separately as well
21but that is no longer needed since apache-ant 1.8.1 and newer has a
22fixed 'ant -diagnostics' command when xerces+xalan are not present.
23
24
25Compiling OpenJDK from source
26=============================
27
28Compiling OpenJDK can be done in two ways.  The first way is called
29"bootstrapping", which means compiling OpenJDK when there is no version of
30the OpenJDK installed yet.  The SlackBuild uses the gcc java compiler for this
31bootstrap (which means you have to have the "gcc-java" package installed).
32The second way is to compile OpenJDK using an already installed version of
33OpenJDK.  Such a pre-installed OpenJDK must have the same version (meaning,
34OpenJDK 8 can only be compiled by another OpenJDK 8) and must have been
35created with the help of "IcedTea" like my own openjdk,SlackBuild does.
36
37The variable "BOOTSTRAP" inside the openjdk.SlackBuild determines which java
38compiler will be used to compile OpenJDK.  If you want to use gcc's java, then
39the command will be:
40
41  # BOOTSTRAP=YES ./openjdk.SlackBuild
42
43If you already have OpenJDK installed then you would start the compilation with:
44
45  # BOOTSTRAP=NO ./openjdk.SlackBuild
46
47By default, the variable in the script is set to "NO" which means that if
48you run the openjdk.SlackBuild script without any parameters, it will use
49a pre-esisting OpenJDK to compile the new package.
50
51This SlackBuild script creates _two_ packages, the "openjdk" and the "openjre".
52If you only need a Java Runtime then all you should install is the openjre
53package - it is much smaller than the openjdk package.  The "openjdk" package
54contains the Java compiler and SDK.
55
56
57Java Web Plugin for OpenJDK
58===========================
59
60Suns's binary distribution of Java (taken over by Oracle) contains a Java web
61plugin for mozilla-compatible browsers.  This plugin was not open sourced,
62so OpenJDK needs a different solution in order to provide a web plugin for Java.
63To this purpose, you have to (build and) install the "icedtea-web" package.
64First compile and install OpenJDK (you need the openjdk package for this, not
65the JRE), then compile icedtea-web.  The SlackBuild script plus sources are
66in a separate directory.  Note that the icedtea-web plugin is not as mature
67as the plugin which is shipped with Oracle's binaries.
68
69
70Build-time requirements for OpenJDK and icedtea-web
71===================================================
72
73Slackware 14.0 and newer:
74-------------------------
75The gcc and seamonkey packages shipped with the distro can be used unmodified.
76
77A word of caution.  All stable Slackware versions before "14.0" are
78not able to compile OpenJDK "out of the box". You have to enhance two core
79packages: "gcc" and "seamonkey" so that they become capable of compiling
80OpenJDK.  Use the following instructions to fix-up gcc and seamonkey.
81Either alternative is OK but running the shell scripts (the "b" options)
82is a *lot* faster than recompiling these big packages.  These core Slackware
83packages have be fixed in slackware-current.
84
85Slackware 13.37:
86----------------
87You need to upgrade to the seamonkey* packages in the ./patches directory.
88Choose one of these two alternatives to get a compatible gcc-java compiler:
89 a) rebuild gcc with "--enable-java-home".  You can use the gcc.SlackBuild
90    of Slackware-current which was modified accordingly.
91 b) or run the script "create_gcj_jvm.sh" to achieve the same result you
92    would get by rebuilding gcc: which is to create a directory structure
93    of symlinks, which emulates the presence of a Sun JDK but for the
94    GCC Java compiler.
95
96Slackware 13.1 and older:
97-------------------------
981) Choose one of these two alternatives for gcc:
99   a) rebuild gcc with "--enable-java-home".  You can use the gcc.SlackBuild
100      of Slackware-current which was modified accordingly.
101   b) or run the script "create_gcj_jvm.sh" to achieve the same result you
102      would get by rebuilding gcc: which is to create a directory structure
103      of symlinks, which emulates the presence of a Sun JDK but for the
104      GCC Java compiler.
1052) Choose one of these two alternatives for seamonkey:
106   a) rebuild seamonkey using the seamonkey.SlackBuild of Slackware-current
107      which was modified accordingly.
108   b) or run the script "fix_seamonkey_pkgconfig.sh" which does two things:
109      add a pkgconfig file "libxul.pc" and modify an existing pkgconfig
110      file, "seamonkey-plugin.pc"
111
112Furthermore, you will need to have the following Apache Ant related packages
113installed before starting the compilation of OpenJDK.
114* apache-ant
115
116Please note that after installing apache-ant you will have to logout and
117login again to initialize the ANT_HOME environment variable.
118
119Apache-ant is only needed during the compilation and can optionally be removed
120afterwards (but why should you).
121
122
123==============================================================================
124Eric Hameleers <alien at slackware.com>, 24-apr-2016
Note: See TracBrowser for help on using the repository browser.