Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2018-08-11 14:57:52
Size: 832
Editor: ?MarkusKoschany
Comment: Add initial Java FAQ page
Revision 3 as of 2018-08-11 14:58:40
Size: 838
Editor: ?MarkusKoschany
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
Instead of a build-dependency on default-jdk, you can build-depend on openjdk-8-jdk or openjdk-11-jdk. Then you have to make sure the JAVA_HOME points to your specific version and not to the default one. You can achieve that by adding Instead of a build-dependency on default-jdk, you can build-depend on openjdk-8-jdk or openjdk-11-jdk. Then you have to make sure JAVA_HOME points to your specific version and not to the default one. You can achieve that by adding
Line 12: Line 12:
{{{
Line 13: Line 14:
}}}

Translation(s): English ~ español

FAQ

How can I use a specific version of OpenJDK to build a package?

Instead of a build-dependency on default-jdk, you can build-depend on openjdk-8-jdk or openjdk-11-jdk. Then you have to make sure JAVA_HOME points to your specific version and not to the default one. You can achieve that by adding

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/

to debian/rules in case you are building the package on amd64.

This is useful for debugging build failures with a non-default JDK. Not build-depending on default-jdk should be avoided though unless there is a very good reason. Otherwise it would make transitions to newer JDK versions more difficult.