Re: How I change my default java 1.8 on F33 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Markku, Sergio,

Just one clarification regarding to: https://fedoraproject.org/wiki/Changes/Decouple_system_java_setting_from_java_command_setting

The alternatives will change the version of command on path - as you both are now aware, there is eg java and javac master.

There is more (the '_'- directories master are usefull:
    - javadoc package: javadocdir
    - devel package: javac, java_sdk_openjdk, java_sdk_11, java_sdk_11_openjdk
    - headless package: java, jre_openjdk, jre_11, jre_11_openjdk
    - javadoc-zip package: javadoczip

Howevr, nothing form this overwrite system java. So  in f33 and up, even if you change your alternatives to jdk8, all applications will still run with jdk11
Similarly, on f32 and down, if yo select your jdk to 11, all applications will run with jdk8.

This can be sometimes tricky with eg ant or maven - as those honor the system jdk, not alternatives.

The only way to override system java is JAVA_HOME. See the link above.

just fyi,
  J.

> Hi,
>
> after you have installed the Java 1.8, you can use the
> alternatives to set which java/javac are used, see the
> current value:
>
> update-alternatives --display java
> update-alternatives --display javac
>
> Change the value:
> update-alternatives --config javac
>
> List:
> update-alternatives --list
>
>
> Alternatives guidelines: https://fedoraproject.org/wiki/Alternatives_system
>
> Best regards,
> Markku


On 4/27/21 11:33 AM, Sérgio Basto wrote:
On Tue, 2021-04-27 at 10:02 +0100, Sérgio Basto wrote:
Hi,

I need work with Java 1.8 , How I default it on F33 ?

replying to myself

alternatives --config java

Solved

Thank you.



--
Jiri Vanek
Principal software QE engineer, OpenJDK QE lead, Mgr.
Red Hat Czech
jvanek@xxxxxxxxxx    M: +420775390109
_______________________________________________
java-devel mailing list -- java-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to java-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/java-devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux