• Setting JAVA_HOME

    From Geert Stappers@21:1/5 to All on Sun Feb 28 14:40:01 2021
    Hi,


    To what should JAVA_HOME be set?

    Or: Which value has JAVA_HOME for you?



    Yeah, simple things should be simple.



    Groeten
    Geert Stappers


    P.S.

    My travelled path
    https://wiki.debian.org/Java
    https://wiki.debian.org/JavaFAQ
    http://www.debian.org/doc/manuals/debian-java-faq/
    https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=java-common;dist=unstable
    --
    Silence is hard to parse

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thorsten Glaser@21:1/5 to Geert Stappers on Sun Feb 28 14:50:02 2021
    On Sun, 28 Feb 2021, Geert Stappers wrote:

    To what should JAVA_HOME be set?

    It should be unset. Also ideally, you have only ever one JRE installed.

    Everything else is a nightmare.

    To make this work with Java >8 and Maven, you’ll need¹…

    <profile>
    <id>jre-not-below-jdk</id>
    <activation>
    <file>
    <exists>${java.home}/bin/javadoc</exists>
    </file>
    </activation>
    <build>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <configuration>
    <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
    </configuration>
    </plugin>
    </plugins>
    </build>
    </profile>

    … or the Debian-patched version of the maven-javadoc-plugin.

    bye,
    //mirabilos
    ① see https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=tartools/mvnparent.git
    or use…
    <parent>
    <groupId>org.evolvis.tartools</groupId>
    <artifactId>maven-parent</artifactId>
    <version>2.1</version>
    </parent>
    --
    Infrastrukturexperte • tarent solutions GmbH
    Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
    Telephon +49 228 54881-393 • Fax: +49 228 54881-235
    HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
    Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

    *************************************************

    Mit dem tarent-Newsletter nichts mehr verpassen: www.tarent.de/newsletter

    *************************************************

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mechtilde@21:1/5 to All on Sun Feb 28 15:30:02 2021
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --l38elY21hbt2KUYhSQGe3JfrZNWuAviXE
    Content-Type: text/plain; charset=utf-8
    Content-Language: en-US
    Content-Transfer-Encoding: quoted-printable

    Hello Geert,

    at most of my Java packages i set

    export JAVA_HOME := /usr/lib/jvm/default-java

    in debian/rules

    Regards

    Mechtilde

    Am 28.02.21 um 15:17 schrieb Geert Stappers:
    On Sun, Feb 28, 2021 at 02:43:34PM +0100, Thorsten Glaser wrote:
    On Sun, 28 Feb 2021, Geert Stappers wrote:

    To what should JAVA_HOME be set?

    It should be unset. Also ideally, you have only ever one JRE installed.

    Everything else is a nightmare.

    :-)


    To make this work with Java >8 and Maven, you’ll need¹…

    <profile>
    <id>jre-not-below-jdk</id>
    <activation>
    <file>
    <exists>${java.home}/bin/javadoc</exists>
    </file>
    </activation>
    <build>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <configuration>
    <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
    </configuration>
    </plugin>
    </plugins>
    </build>
    </profile>

    … or the Debian-patched version of the maven-javadoc-plugin.



    Sharing my "nightmare" with you

    | $ javaws ~/Downloads/launch\(3\).jnlp
    | Codebase matches codebase manifest attribute, and application is signed. Continuing. See: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/no_redeploy.html for details.
    | Starting application [tw.com.aten.ikvm.KVMMain] ...
    | Buf size:425984
    | Exception in thread "AWT-EventQueue-1" javax.xml.parsers.FactoryConfigurationError: Provider for class javax.xml.parsers.DocumentBuilderFactory cannot be created
    | at java.xml/javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:305)
    | at java.xml/javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:261)
    | at java.xml/javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:140)
    | ...Java stack trace...


    Manual page of `javaws` mentions JAVA_HOME

    With `apt-file search DocumentBuilderFactory` I did found
    | openjdk-11-doc: /usr/share/doc/openjdk-11-jre-headless/api/java.xml/javax/xml/parsers/DocumentBuilderFactory.html
    | openjdk-11-doc: /usr/share/doc/openjdk-11-jre-headless/api/java.xml/javax/xml/parsers/class-use/DocumentBuilderFactory.html
    | openjdk-15-doc: /usr/share/doc/openjdk-15-jre-headless/api/java.xml/javax/xml/parsers/DocumentBuilderFactory.html
    | openjdk-15-doc: /usr/share/doc/openjdk-15-jre-headless/api/java.xml/javax/xml/parsers/class-use/DocumentBuilderFactory.html
    | openjdk-16-doc: /usr/share/doc/openjdk-16-jre-headless/api/java.xml/javax/xml/parsers/DocumentBuilderFactory.html
    | openjdk-16-doc: /usr/share/doc/openjdk-16-jre-headless/api/java.xml/javax/xml/parsers/class-use/DocumentBuilderFactory.html
    | openjdk-17-doc: /usr/share/doc/openjdk-17-jre-headless/api/java.xml/javax/xml/parsers/DocumentBuilderFactory.html
    | openjdk-17-doc: /usr/share/doc/openjdk-17-jre-headless/api/java.xml/javax/xml/parsers/class-use/DocumentBuilderFactory.html


    Hence the original
    To what should JAVA_HOME be set?


    At https://www.wikihow.com/Set-Java-Home#For-Linux I found JAVA_HOME=/usr/java/jdk1.6.0_06/bin/java

    But there is no /usr/java/ on my Debian system.


    Transforming
    Which value has JAVA_HOME for you?
    into


    Which sane value for JAVA_HOME should I try
    with next `javaws launch.jnlp` ?



    Groeten
    Geert Stappers


    --
    Mechtilde Stehmann
    ## Apache OpenOffice
    ## Freie Office Suite für Linux, MacOSX, Windows und OS/2
    ## Debian Developer
    ## PGP encryption welcome
    ## F0E3 7F3D C87A 4998 2899 39E7 F287 7BBA 141A AD7F


    --l38elY21hbt2KUYhSQGe3JfrZNWuAviXE--

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE8ON/Pch6SZgomTnn8od7uhQarX8FAmA7qCEACgkQ8od7uhQa rX8dwg/+MtxLfQ3EQjgN+cljjL9R4YjgiGpmCchWUwAhZfA3GZRmHC5LE3HlW4Mk pBrr6IBPNc5vyn4DTTtEyjzNEpcgKhwMrZfTchljypf8tsbD4hESZCA0yIHdCkBU X3OG+vxuBqsvHi3yvp3BXo9oP+KolKvUSPi70J5d4tbRjJCEhHSxZL7iyouP4pWd bfAAT/B7B6FstdyZw17ti2fv9V7G3WnQAN4dWp2zzFA0mNnq7zoWEScQqnqdgYE0 DYYf2w5qQJtLJpEhHqAphtNMUrv5i0X5Tjt2n7xahv8XxlqlVaJNfojwGRh00PEo bg7fXeiWkK+WP6OArPGVYctzoY27ih70mTSz9i9zxKKC4N5SMW30EbocumLy9tLU VYmhWpmk/UiUFK5Raod9P6AKSWlRYqvmTy41eccQemwFJ73pGInBd2vbJY0crKVi svPsUfa5aMtXtmqTM1uTImwdugOpNbQJgh+BwxaW/tQtCkpC2plJeTSQOAxr1S25 LtAud69CTy9sEu0EwXmEnlAe3OXokjrVn/HVnXqzvRroVQ0Kplf6tsZEKgT7hy0f v3xRRD1ojPCT7djcALjLI8di7eYy/iWg76nN2Bw3nrqCahOgCpS0XavaTSSGX2+k
    4B9ngDQOC3
  • From Geert Stappers@21:1/5 to Thorsten Glaser on Sun Feb 28 15:20:02 2021
    On Sun, Feb 28, 2021 at 02:43:34PM +0100, Thorsten Glaser wrote:
    On Sun, 28 Feb 2021, Geert Stappers wrote:

    To what should JAVA_HOME be set?

    It should be unset. Also ideally, you have only ever one JRE installed.

    Everything else is a nightmare.

    :-)


    To make this work with Java >8 and Maven, you’ll need¹…

    <profile>
    <id>jre-not-below-jdk</id>
    <activation>
    <file>
    <exists>${java.home}/bin/javadoc</exists>
    </file>
    </activation>
    <build>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <configuration>
    <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
    </configuration>
    </plugin>
    </plugins>
    </build>
    </profile>

    … or the Debian-patched version of the maven-javadoc-plugin.



    Sharing my "nightmare" with you

    | $ javaws ~/Downloads/launch\(3\).jnlp
    | Codebase matches codebase manifest attribute, and application is signed. Continuing. See: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/no_redeploy.html for details.
    | Starting application [tw.com.aten.ikvm.KVMMain] ...
    | Buf size:425984
    | Exception in thread "AWT-EventQueue-1" javax.xml.parsers.FactoryConfigurationError: Provider for class javax.xml.parsers.DocumentBuilderFactory cannot be created
    | at java.xml/javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:305)
    | at java.xml/javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:261)
    | at java.xml/javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:140)
    | ...Java stack trace...


    Manual page of `javaws` mentions JAVA_HOME

    With `apt-file search DocumentBuilderFactory` I did found
    | openjdk-11-doc: /usr/share/doc/openjdk-11-jre-headless/api/java.xml/javax/xml/parsers/DocumentBuilderFactory.html
    | openjdk-11-doc: /usr/share/doc/openjdk-11-jre-headless/api/java.xml/javax/xml/parsers/class-use/DocumentBuilderFactory.html
    | openjdk-15-doc: /usr/share/doc/openjdk-15-jre-headless/api/java.xml/javax/xml/parsers/DocumentBuilderFactory.html
    | openjdk-15-doc: /usr/share/doc/openjdk-15-jre-headless/api/java.xml/javax/xml/parsers/class-use/DocumentBuilderFactory.html
    | openjdk-16-doc: /usr/share/doc/openjdk-16-jre-headless/api/java.xml/javax/xml/parsers/DocumentBuilderFactory.html
    | openjdk-16-doc: /usr/share/doc/openjdk-16-jre-headless/api/java.xml/javax/xml/parsers/class-use/DocumentBuilderFactory.html
    | openjdk-17-doc: /usr/share/doc/openjdk-17-jre-headless/api/java.xml/javax/xml/parsers/DocumentBuilderFactory.html
    | openjdk-17-doc: /usr/share/doc/openjdk-17-jre-headless/api/java.xml/javax/xml/parsers/class-use/DocumentBuilderFactory.html


    Hence the original
    To what should JAVA_HOME be set?


    At https://www.wikihow.com/Set-Java-Home#For-Linux I found JAVA_HOME=/usr/java/jdk1.6.0_06/bin/java

    But there is no /usr/java/ on my Debian system.


    Transforming
    Which value has JAVA_HOME for you?
    into


    Which sane value for JAVA_HOME should I try
    with next `javaws launch.jnlp` ?



    Groeten
    Geert Stappers
    --
    Silence is hard to parse

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Emmanuel Bourg@21:1/5 to All on Sun Feb 28 18:20:01 2021
    Le 28/02/2021 à 15:26, Mechtilde a écrit :

    at most of my Java packages i set

    export JAVA_HOME := /usr/lib/jvm/default-java

    in debian/rules

    You can remove it from debian/rules, unless you want to build with a
    specific JRE (for example Java 8 when Java 11 is the default) that's
    useless.

    Emmanuel Bourg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)