1 |
|
---|
2 | The Release Kit is configured to produce 'backwards compatible' Java
|
---|
3 | code using -target and -source. When running 'javac' with these flags
|
---|
4 | this requires the "rt.jar" that matches the older JDK to be present --
|
---|
5 | not something that is shipped with newer JDKs.
|
---|
6 |
|
---|
7 | The purpose of this directory is to store such rt.jar files, which are
|
---|
8 | then included into our compilation process through setting JAVACFLAGS
|
---|
9 | appropriate (using -bootclasspath).
|
---|
10 |
|
---|
11 |
|
---|
12 | At the time of writing Greenstone3 targets JDK 1.8 as the oldest
|
---|
13 | supported version. Over time it is expected that we might start
|
---|
14 | accumulating other versions of rt.jar here, and so this file has been
|
---|
15 | named:
|
---|
16 |
|
---|
17 | rt-openjdk8.jar
|
---|
18 |
|
---|
19 | which reflects that it is the OpenJDK Version 8 of rt.jar that has
|
---|
20 | been placed here. The actualy distribution of JDK used (OpenJDK)
|
---|
21 | should not be relevant here, but is reflected in the filename chosen
|
---|
22 | for reasons of transparency
|
---|
23 |
|
---|
24 | For some additional background on compiling with -source and -target, see:
|
---|
25 |
|
---|
26 | https://stackoverflow.com/questions/15492948/javac-source-and-target-options
|
---|
27 |
|
---|
28 | ==
|
---|
29 |
|
---|
30 | An added extra wrinkle is we also need to deal with any jar files in
|
---|
31 | jre/lib/ext (part of Java's extension mechanism) that are used by any
|
---|
32 | Greenstone3 Java source code. It turns out Greenstone3 admin tool uses
|
---|
33 | javax.crypto package which means we also need to effectively add in
|
---|
34 | 'jce.jar' here. Unlike rt.jar, this is *not* something that is expected
|
---|
35 | to change over time, and forunately Oracle has a download for the extension:
|
---|
36 |
|
---|
37 | https://www.oracle.com/java/technologies/java-archive-downloads-java-plat-downloads.html#
|
---|
38 |
|
---|
39 | At the time of writing, JCE-1.2.2
|
---|
40 |
|
---|
41 | Following the instructions included in the download, there are in fact 4 jar files that
|
---|
42 | java/javac need access to to support the JCE extension:
|
---|
43 |
|
---|
44 | jce1_2_2.jar local_policy.jar sunjce_provider.jar US_export_policy.jar
|
---|
45 |
|
---|
46 | These are provided there, and added in to the -bootclasspath part of JAVACFLAGS
|
---|
47 | through rk-setup.bash
|
---|