Discussion:
[fedora-java] How I change my default java 1.8 on F33 ?
Sérgio Basto
2021-04-27 09:02:05 UTC
Permalink
Hi,

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

Thank you.
--
Sérgio M. B.
_______________________________________________
java-devel mailing list -- java-***@lists.fedoraproject.org
To unsubscribe send an email to java-devel-***@lists.fedoraproject.org
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-***@lists.fedoraproject.org
Do not reply to spam on the list, re
Markku Korkeala
2021-04-27 09:15:23 UTC
Permalink
Post by Sérgio Basto
Hi,
I need work with Java 1.8 , How I default it on F33 ?
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
Post by Sérgio Basto
Thank you.
_______________________________________________
java-devel mailing list -- java-***@lists.fedoraproject.org
To unsubscribe send an email to java-devel-***@lists.fedoraproject.org
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-***@lists.fedoraproject.org
Do not reply to spam on the list, report it:
Sérgio Basto
2021-04-27 10:05:09 UTC
Permalink
Post by Markku Korkeala
Post by Sérgio Basto
Hi,
I need work with Java 1.8 , How I default it on F33 ?
Hi,
after you have installed the Java 1.8, you can use the
alternatives to set which java/javac are used, see the
update-alternatives --display java
update-alternatives --display javac
update-alternatives --config javac
update-alternatives --list
https://fedoraproject.org/wiki/Alternatives_system
My project is working now
Thank you ,
Post by Markku Korkeala
Best regards,
Markku
Post by Sérgio Basto
Thank you.
_______________________________________________
To unsubscribe send an email to
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
https://fedoraproject.org/wiki/Mailing_list_guidelines
https://pagure.io/fedora-infrastructure
--
Sérgio M. B.
_______________________________________________
java-devel mailing list -- java-***@lists.fedoraproject.org
To unsubscribe send an email to java-devel-***@lists.fedoraproject.org
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-***@lists.fedoraproject.org
Do not reply to spam on the list, rep
Sérgio Basto
2021-04-27 09:33:10 UTC
Permalink
Post by Sérgio Basto
Hi,
I need work with Java 1.8 , How I default it on F33 ?
replying to myself

alternatives --config java

Solved

Thank you.

--
Sérgio M. B.
_______________________________________________
java-devel mailing list -- java-***@lists.fedoraproject.org
To unsubscribe send an email to java-devel-***@lists.fedoraproject.org
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-***@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrast
Jiri Vanek
2021-04-27 10:14:36 UTC
Permalink
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.
Post by Markku Korkeala
Hi,
after you have installed the Java 1.8, you can use the
alternatives to set which java/javac are used, see the
update-alternatives --display java
update-alternatives --display javac
update-alternatives --config javac
update-alternatives --list
Alternatives guidelines: https://fedoraproject.org/wiki/Alternatives_system
Best regards,
Markku
Post by Sérgio Basto
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
***@redhat.com M: +420775390109
_______________________________________________
java-devel mailing list -- java-***@lists.fedoraproject.org
To unsubscribe send an email to java-devel-***@lists.fedoraproject.org
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-***@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-in
Loading...