Dear fedora users,
I want to generate randomly generated triangles from points as in
https://www.sanfoundry.com/java-program-compute-area-triangle-using-determin...
The java program compiles fine but executing it returns an error. I do not understand the error.
[olivares@fedora mptmp]$ uname -a Linux fedora 6.4.15-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 7 00:25:01 UTC 2023 x86_64 GNU/Linux [olivares@fedora mptmp]$ javac Area_Triangle_Determinants.java [olivares@fedora mptmp]$ java Area_Triangle_Determinants Error: LinkageError occurred while loading main class Area_Triangle_Determinants java.lang.UnsupportedClassVersionError: Area_Triangle_Determinants has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0 [olivares@fedora mptmp]$
I had another program called Ulam (3n+1) conjecture, Or Collatz Conjecture and it also fails to run.
[olivares@fedora mptmp]$ javac Ulam.java [olivares@fedora mptmp]$ java Ulam Error: LinkageError occurred while loading main class Ulam java.lang.UnsupportedClassVersionError: Ulam has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0 [olivares@fedora mptmp]$
I have not been able to run theses programs using openjdk ...
[olivares@fedora mptmp]$ sudo dnf search openjdk Last metadata expiration check: 1:48:18 ago on Fri 22 Sep 2023 12:55:05 PM CDT. ======================= Name & Summary Matched: openjdk ======================== java-1.8.0-openjdk.x86_64 : OpenJDK 8 Runtime Environment java-1.8.0-openjdk-demo.x86_64 : OpenJDK 8 Demos java-1.8.0-openjdk-demo-fastdebug.x86_64 : OpenJDK 8 Demos optimised with full : debugging on java-1.8.0-openjdk-demo-slowdebug.x86_64 : OpenJDK 8 Demos unoptimised with full : debugging on java-1.8.0-openjdk-devel.x86_64 : OpenJDK 8 Development Environment java-1.8.0-openjdk-devel-fastdebug.x86_64 : OpenJDK 8 Development Environment : optimised with full debugging on java-1.8.0-openjdk-devel-slowdebug.x86_64 : OpenJDK 8 Development Environment : unoptimised with full debugging on java-1.8.0-openjdk-fastdebug.x86_64 : OpenJDK 8 Runtime Environment optimised : with full debugging on java-1.8.0-openjdk-headless.x86_64 : OpenJDK 8 Headless Runtime Environment java-1.8.0-openjdk-headless-fastdebug.x86_64 : OpenJDK 8 Runtime Environment : optimised with full debugging on java-1.8.0-openjdk-headless-slowdebug.x86_64 : OpenJDK 8 Runtime Environment ...: unoptimised with full debugging on java-1.8.0-openjdk-javadoc.noarch : OpenJDK 8 API documentation java-1.8.0-openjdk-javadoc-zip.noarch : OpenJDK 8 API documentation compressed : in a single archive java-1.8.0-openjdk-openjfx.x86_64 : OpenJDK x OpenJFX connector. This package ...: adds symliks finishing Java FX integration to java-1.8.0-openjdk java-1.8.0-openjdk-openjfx-devel.x86_64 : OpenJDK x OpenJFX connector for FX ...: developers. This package adds symliks finishing Java FX integration to ...: java-1.8.0-openjdk-devel java-1.8.0-openjdk-openjfx-devel-fastdebug.x86_64 : OpenJDK x OpenJFX connector ...: for FX developers for packages with debugging on and optimisation. ...: This package adds symliks finishing Java FX integration to ...: java-1.8.0-openjdk-devel-slowdebug java-1.8.0-openjdk-openjfx-devel-slowdebug.x86_64 : OpenJDK x OpenJFX connector ...: for FX developers for packages with debugging on and no optimisation. ...: This package adds symliks finishing Java FX integration to ...: java-1.8.0-openjdk-devel-slowdebug java-1.8.0-openjdk-openjfx-fastdebug.x86_64 : OpenJDK x OpenJFX connector for ...: packages with debugging on and optimisation. his package adds symliks ...: finishing Java FX integration to java-1.8.0-openjdk-fastdebug java-1.8.0-openjdk-openjfx-slowdebug.x86_64 : OpenJDK x OpenJFX connector for ...: packages with debugging on and no optimisation. his package adds ...: symliks finishing Java FX integration to java-1.8.0-openjdk-slowdebug java-1.8.0-openjdk-portable.x86_64 : OpenJDK 8 Runtime Environment portable : edition java-1.8.0-openjdk-portable-devel.x86_64 : OpenJDK 8 Development Environment : portable edition java-1.8.0-openjdk-portable-devel-fastdebug.x86_64 : OpenJDK 8 Development ...: Environment portable edition optimised with full debugging on java-1.8.0-openjdk-portable-devel-slowdebug.x86_64 : OpenJDK 8 Development ...: Environment portable edition unoptimised with full debugging on java-1.8.0-openjdk-portable-fastdebug.x86_64 : OpenJDK 8 Runtime Environment ...: portable edition optimised with full debugging on java-1.8.0-openjdk-portable-slowdebug.x86_64 : OpenJDK 8 Runtime Environment ...: portable edition unoptimised with full debugging on java-1.8.0-openjdk-portable-sources.x86_64 : OpenJDK 8 full patched sources of : portable JDK java-1.8.0-openjdk-slowdebug.x86_64 : OpenJDK 8 Runtime Environment unoptimised : with full debugging on java-1.8.0-openjdk-src.x86_64 : OpenJDK 8 Source Bundle java-1.8.0-openjdk-src-fastdebug.x86_64 : OpenJDK 8 Source Bundle for packages : with debugging on and optimisation java-1.8.0-openjdk-src-slowdebug.x86_64 : OpenJDK 8 Source Bundle for packages : with debugging on and no optimisation java-11-openjdk.x86_64 : OpenJDK 11 Runtime Environment java-11-openjdk-demo.x86_64 : OpenJDK 11 Demos java-11-openjdk-demo-fastdebug.x86_64 : OpenJDK 11 Demos optimised with full : debugging on java-11-openjdk-demo-slowdebug.x86_64 : OpenJDK 11 Demos unoptimised with full : debugging on java-11-openjdk-devel.x86_64 : OpenJDK 11 Development Environment java-11-openjdk-devel-fastdebug.x86_64 : OpenJDK 11 Development Environment : optimised with full debugging on java-11-openjdk-devel-slowdebug.x86_64 : OpenJDK 11 Development Environment : unoptimised with full debugging on java-11-openjdk-fastdebug.x86_64 : OpenJDK 11 Runtime Environment optimised with : full debugging on java-11-openjdk-headless.x86_64 : OpenJDK 11 Headless Runtime Environment java-11-openjdk-headless-fastdebug.x86_64 : OpenJDK 11 Runtime Environment : optimised with full debugging on java-11-openjdk-headless-slowdebug.x86_64 : OpenJDK 11 Runtime Environment : unoptimised with full debugging on java-11-openjdk-javadoc.x86_64 : OpenJDK 11 API documentation java-11-openjdk-javadoc-zip.x86_64 : OpenJDK 11 API documentation compressed in : a single archive java-11-openjdk-jmods.x86_64 : JMods for OpenJDK 11 java-11-openjdk-jmods-fastdebug.x86_64 : JMods for OpenJDK 11 optimised with : full debugging on java-11-openjdk-jmods-slowdebug.x86_64 : JMods for OpenJDK 11 unoptimised with : full debugging on java-11-openjdk-portable.x86_64 : OpenJDK 11 Runtime Environment portable : edition java-11-openjdk-portable-devel.x86_64 : OpenJDK 11 Development Environment : portable edition java-11-openjdk-portable-devel-fastdebug.x86_64 : OpenJDK 11 Runtime and ...: Development Environment portable edition optimised with full debugging ...: on java-11-openjdk-portable-devel-slowdebug.x86_64 : OpenJDK 11 Runtime and ...: Development Environment portable edition unoptimised with full ...: debugging on java-11-openjdk-portable-fastdebug.x86_64 : OpenJDK 11 Runtime Environment ...: portable edition optimised with full debugging on java-11-openjdk-portable-slowdebug.x86_64 : OpenJDK 11 Runtime Environment ...: portable edition unoptimised with full debugging on java-11-openjdk-portable-sources.x86_64 : OpenJDK 11 full patched sources of : portable JDK java-11-openjdk-portable-static-libs.x86_64 : OpenJDK 11 libraries for static : linking - portable edition. java-11-openjdk-portable-static-libs-fastdebug.x86_64 : OpenJDK 11 libraries for ...: static linking - portable edition optimised with full debugging on java-11-openjdk-portable-static-libs-slowdebug.x86_64 : OpenJDK 11 libraries for ...: static linking - portable edition unoptimised with full debugging on java-11-openjdk-slowdebug.x86_64 : OpenJDK 11 Runtime Environment unoptimised : with full debugging on java-11-openjdk-src.x86_64 : OpenJDK 11 Source Bundle java-11-openjdk-src-fastdebug.x86_64 : OpenJDK 11 Source Bundle for packages : with debugging on and optimisation java-11-openjdk-src-slowdebug.x86_64 : OpenJDK 11 Source Bundle for packages : with debugging on and no optimisation java-11-openjdk-static-libs.x86_64 : OpenJDK 11 libraries for static linking java-11-openjdk-static-libs-fastdebug.x86_64 : OpenJDK 11 libraries for static ...: linking optimised with full debugging on java-11-openjdk-static-libs-slowdebug.x86_64 : OpenJDK 11 libraries for static ...: linking unoptimised with full debugging on java-17-openjdk.x86_64 : OpenJDK 17 Runtime Environment java-17-openjdk-demo.x86_64 : OpenJDK 17 Demos java-17-openjdk-demo-fastdebug.x86_64 : OpenJDK 17 Demos optimised with full : debugging on java-17-openjdk-demo-slowdebug.x86_64 : OpenJDK 17 Demos unoptimised with full : debugging on java-17-openjdk-devel.x86_64 : OpenJDK 17 Development Environment java-17-openjdk-devel-fastdebug.x86_64 : OpenJDK 17 Development Environment : optimised with full debugging on java-17-openjdk-devel-slowdebug.x86_64 : OpenJDK 17 Development Environment : unoptimised with full debugging on java-17-openjdk-fastdebug.x86_64 : OpenJDK 17 Runtime Environment optimised with : full debugging on java-17-openjdk-headless.x86_64 : OpenJDK 17 Headless Runtime Environment java-17-openjdk-headless-fastdebug.x86_64 : OpenJDK 17 Runtime Environment : optimised with full debugging on java-17-openjdk-headless-slowdebug.x86_64 : OpenJDK 17 Runtime Environment : unoptimised with full debugging on java-17-openjdk-javadoc.x86_64 : OpenJDK 17 API documentation java-17-openjdk-javadoc-zip.x86_64 : OpenJDK 17 API documentation compressed in : a single archive java-17-openjdk-jmods.x86_64 : JMods for OpenJDK 17 java-17-openjdk-jmods-fastdebug.x86_64 : JMods for OpenJDK 17 optimised with : full debugging on java-17-openjdk-jmods-slowdebug.x86_64 : JMods for OpenJDK 17 unoptimised with : full debugging on java-17-openjdk-portable.x86_64 : OpenJDK 17 Runtime Environment portable : edition java-17-openjdk-portable-devel.x86_64 : OpenJDK 17 Development Environment : portable edition java-17-openjdk-portable-devel-fastdebug.x86_64 : OpenJDK 17 Runtime and ...: Development Environment portable edition optimised with full debugging ...: on java-17-openjdk-portable-devel-slowdebug.x86_64 : OpenJDK 17 Runtime and ...: Development Environment portable edition unoptimised with full ...: debugging on java-17-openjdk-portable-fastdebug.x86_64 : OpenJDK 17 Runtime Environment ...: portable edition optimised with full debugging on java-17-openjdk-portable-slowdebug.x86_64 : OpenJDK 17 Runtime Environment ...: portable edition unoptimised with full debugging on java-17-openjdk-portable-sources.x86_64 : OpenJDK 17 full patched sources of : portable JDK java-17-openjdk-portable-static-libs.x86_64 : OpenJDK 17 libraries for static : linking - portable edition. java-17-openjdk-portable-static-libs-fastdebug.x86_64 : OpenJDK 17 libraries for ...: static linking - portable edition optimised with full debugging on java-17-openjdk-portable-static-libs-slowdebug.x86_64 : OpenJDK 17 libraries for ...: static linking - portable edition unoptimised with full debugging on java-17-openjdk-slowdebug.x86_64 : OpenJDK 17 Runtime Environment unoptimised : with full debugging on java-17-openjdk-src.x86_64 : OpenJDK 17 Source Bundle java-17-openjdk-src-fastdebug.x86_64 : OpenJDK 17 Source Bundle for packages : with debugging on and optimisation java-17-openjdk-src-slowdebug.x86_64 : OpenJDK 17 Source Bundle for packages : with debugging on and no optimisation java-17-openjdk-static-libs.x86_64 : OpenJDK 17 libraries for static linking java-17-openjdk-static-libs-fastdebug.x86_64 : OpenJDK 17 libraries for static ...: linking optimised with full debugging on java-17-openjdk-static-libs-slowdebug.x86_64 : OpenJDK 17 libraries for static ...: linking unoptimised with full debugging on java-latest-openjdk.x86_64 : OpenJDK 21 Runtime Environment java-latest-openjdk-demo.x86_64 : OpenJDK 21 Demos java-latest-openjdk-demo-fastdebug.x86_64 : OpenJDK 21 Demos optimised with full : debugging on java-latest-openjdk-demo-slowdebug.x86_64 : OpenJDK 21 Demos unoptimised with : full debugging on java-latest-openjdk-devel.x86_64 : OpenJDK 21 Development Environment java-latest-openjdk-devel-fastdebug.x86_64 : OpenJDK 21 Development Environment : optimised with full debugging on java-latest-openjdk-devel-slowdebug.x86_64 : OpenJDK 21 Development Environment : unoptimised with full debugging on java-latest-openjdk-fastdebug.x86_64 : OpenJDK 21 Runtime Environment optimised : with full debugging on java-latest-openjdk-headless.x86_64 : OpenJDK 21 Headless Runtime Environment java-latest-openjdk-headless-fastdebug.x86_64 : OpenJDK 21 Runtime Environment : optimised with full debugging on java-latest-openjdk-headless-slowdebug.x86_64 : OpenJDK 21 Runtime Environment ...: unoptimised with full debugging on java-latest-openjdk-javadoc.x86_64 : OpenJDK 21 API documentation java-latest-openjdk-javadoc-zip.x86_64 : OpenJDK 21 API documentation compressed : in a single archive java-latest-openjdk-jmods.x86_64 : JMods for OpenJDK 21 java-latest-openjdk-jmods-fastdebug.x86_64 : JMods for OpenJDK 21 optimised with : full debugging on java-latest-openjdk-jmods-slowdebug.x86_64 : JMods for OpenJDK 21 unoptimised : with full debugging on java-latest-openjdk-portable.x86_64 : OpenJDK 21 Runtime Environment portable : edition java-latest-openjdk-portable-devel.x86_64 : OpenJDK 21 Development Environment : portable edition java-latest-openjdk-portable-devel-fastdebug.x86_64 : OpenJDK 21 Runtime and ...: Development Environment portable edition optimised with full debugging ...: on java-latest-openjdk-portable-devel-slowdebug.x86_64 : OpenJDK 21 Runtime and ...: Development Environment portable edition unoptimised with full ...: debugging on java-latest-openjdk-portable-fastdebug.x86_64 : OpenJDK 21 Runtime Environment ...: portable edition optimised with full debugging on java-latest-openjdk-portable-slowdebug.x86_64 : OpenJDK 21 Runtime Environment ...: portable edition unoptimised with full debugging on java-latest-openjdk-portable-sources.x86_64 : OpenJDK 21 full patched sources of : portable JDK java-latest-openjdk-portable-static-libs.x86_64 : OpenJDK 21 libraries for ...: static linking - portable edition. java-latest-openjdk-portable-static-libs-fastdebug.x86_64 : OpenJDK 21 libraries ...: for static linking - portable edition optimised with full debugging on java-latest-openjdk-portable-static-libs-slowdebug.x86_64 : OpenJDK 21 libraries ...: for static linking - portable edition unoptimised with full debugging ...: on java-latest-openjdk-slowdebug.x86_64 : OpenJDK 21 Runtime Environment : unoptimised with full debugging on java-latest-openjdk-src.x86_64 : OpenJDK 21 Source Bundle java-latest-openjdk-src-fastdebug.x86_64 : OpenJDK 21 Source Bundle for packages : with debugging on and optimisation java-latest-openjdk-src-slowdebug.x86_64 : OpenJDK 21 Source Bundle for packages : with debugging on and no optimisation java-latest-openjdk-static-libs.x86_64 : OpenJDK 21 libraries for static linking java-latest-openjdk-static-libs-fastdebug.x86_64 : OpenJDK 21 libraries for ...: static linking optimised with full debugging on java-latest-openjdk-static-libs-slowdebug.x86_64 : OpenJDK 21 libraries for ...: static linking unoptimised with full debugging on javapackages-bootstrap-openjdk8.noarch : OpenJDK 8 toolchain for Java Packages : Bootstrap maven-local-openjdk11.noarch : OpenJDK 11 toolchain for XMvn maven-local-openjdk17.noarch : OpenJDK 17 toolchain for XMvn maven-local-openjdk8.noarch : OpenJDK 8 toolchain for XMvn maven-openjdk11.noarch : OpenJDK 11 binding for Maven maven-openjdk17.noarch : OpenJDK 17 binding for Maven maven-openjdk8.noarch : OpenJDK 8 binding for Maven openjdk-asmtools7-javadoc.noarch : Javadoc for openjdk-asmtools7 prometheus-jmx-exporter-openjdk11.noarch : OpenJDK 11 binding for : prometheus-jmx-exporter prometheus-jmx-exporter-openjdk17.noarch : OpenJDK 17 binding for : prometheus-jmx-exporter prometheus-jmx-exporter-openjdk8.noarch : OpenJDK 1.8.0 binding for : prometheus-jmx-exporter ============================ Name Matched: openjdk ============================= openjdk-asmtools.noarch : Set of tools used to assemble / disassemble proper and : improper Java .class files openjdk-asmtools7.noarch : Set of tools used to assemble / disassemble proper ...: and improper Java .class files for JDK version 11 and lesser [olivares@fedora mptmp]$
any suggestions as to why it does not run? Do I need to use oracle's java? does openjdk no longer work. Thank you in advance.
Best Regards,
Antonio
Sent from ProtonMail, encrypted email based in Switzerland.
Sent with Proton Mail secure email.
On 9/22/23 12:45, olivares33561 via users wrote:
Dear fedora users,
I want to generate randomly generated triangles from points as in
https://www.sanfoundry.com/java-program-compute-area-triangle-using-determin...
The java program compiles fine but executing it returns an error. I do not understand the error.
[olivares@fedora mptmp]$ uname -a Linux fedora 6.4.15-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 7 00:25:01 UTC 2023 x86_64 GNU/Linux [olivares@fedora mptmp]$ javac Area_Triangle_Determinants.java [olivares@fedora mptmp]$ java Area_Triangle_Determinants Error: LinkageError occurred while loading main class Area_Triangle_Determinants java.lang.UnsupportedClassVersionError: Area_Triangle_Determinants has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
Looks like the compiler you're running is newer than the runtime you're using. What do "javac --version" and "java --version" show? What does "rpm -qa | grep openjdk" show?
[olivares@fedora mptmp]$ uname -a Linux fedora 6.4.15-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 7 00:25:01 UTC 2023 x86_64 GNU/Linux [olivares@fedora mptmp]$ javac Area_Triangle_Determinants.java [olivares@fedora mptmp]$ java Area_Triangle_Determinants Error: LinkageError occurred while loading main class Area_Triangle_Determinants java.lang.UnsupportedClassVersionError: Area_Triangle_Determinants has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
Looks like the compiler you're running is newer than the runtime you're using. What do "javac --version" and "java --version" show? What does "rpm -qa | grep openjdk" show? _______________________________________________
[olivares@fedora mptmp]$ javac --version javac 21 [olivares@fedora mptmp]$ java --version openjdk 17.0.8 2023-07-18 OpenJDK Runtime Environment (Red_Hat-17.0.8.0.7-1.fc38) (build 17.0.8+7) OpenJDK 64-Bit Server VM (Red_Hat-17.0.8.0.7-1.fc38) (build 17.0.8+7, mixed mode, sharing) [olivares@fedora mptmp]$ rpm -qa | grep openjdk java-17-openjdk-headless-17.0.8.0.7-1.fc38.x86_64 java-latest-openjdk-headless-21.0.0.0.35-1.rolling.fc38.x86_64 java-latest-openjdk-21.0.0.0.35-1.rolling.fc38.x86_64 java-latest-openjdk-devel-21.0.0.0.35-1.rolling.fc38.x86_64 [olivares@fedora mptmp]$
Best Regards,
Antonio
On 9/26/23 06:03, olivares33561 via users wrote:
[olivares@fedora mptmp]$ uname -a Linux fedora 6.4.15-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 7 00:25:01 UTC 2023 x86_64 GNU/Linux [olivares@fedora mptmp]$ javac Area_Triangle_Determinants.java [olivares@fedora mptmp]$ java Area_Triangle_Determinants Error: LinkageError occurred while loading main class Area_Triangle_Determinants java.lang.UnsupportedClassVersionError: Area_Triangle_Determinants has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
Looks like the compiler you're running is newer than the runtime you're using. What do "javac --version" and "java --version" show? What does "rpm -qa | grep openjdk" show? _______________________________________________
[olivares@fedora mptmp]$ javac --version javac 21 [olivares@fedora mptmp]$ java --version openjdk 17.0.8 2023-07-18 OpenJDK Runtime Environment (Red_Hat-17.0.8.0.7-1.fc38) (build 17.0.8+7) OpenJDK 64-Bit Server VM (Red_Hat-17.0.8.0.7-1.fc38) (build 17.0.8+7, mixed mode, sharing)
So there's the problem. You're compiling with 21, but running it with 17. You could try adding "--release 17" to the javac command when you compile or switch the default java to 21 using the alternatives command. Or directly specify the 17 compiler when you compile.
Sent from ProtonMail, encrypted email based in Switzerland.
Sent with Proton Mail secure email.
------- Original Message ------- On Tuesday, September 26th, 2023 at 12:03 PM, Samuel Sieb samuel@sieb.net wrote:
On 9/26/23 06:03, olivares33561 via users wrote:
[olivares@fedora mptmp]$ uname -a Linux fedora 6.4.15-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 7 00:25:01 UTC 2023 x86_64 GNU/Linux [olivares@fedora mptmp]$ javac Area_Triangle_Determinants.java [olivares@fedora mptmp]$ java Area_Triangle_Determinants Error: LinkageError occurred while loading main class Area_Triangle_Determinants java.lang.UnsupportedClassVersionError: Area_Triangle_Determinants has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
Looks like the compiler you're running is newer than the runtime you're using. What do "javac --version" and "java --version" show? What does "rpm -qa | grep openjdk" show? _______________________________________________
[olivares@fedora mptmp]$ javac --version javac 21 [olivares@fedora mptmp]$ java --version openjdk 17.0.8 2023-07-18 OpenJDK Runtime Environment (Red_Hat-17.0.8.0.7-1.fc38) (build 17.0.8+7) OpenJDK 64-Bit Server VM (Red_Hat-17.0.8.0.7-1.fc38) (build 17.0.8+7, mixed mode, sharing)
So there's the problem. You're compiling with 21, but running it with 17. You could try adding "--release 17" to the javac command when you compile or switch the default java to 21 using the alternatives command. Or directly specify the 17 compiler when you compile. _______________________________________________
Dear Sir,
Thank you for your help.
[olivares@fedora mptmp]$ rpm -qa | grep openjdk java-17-openjdk-headless-17.0.8.0.7-1.fc38.x86_64 java-latest-openjdk-headless-21.0.0.0.35-1.rolling.fc38.x86_64 java-latest-openjdk-21.0.0.0.35-1.rolling.fc38.x86_64 java-latest-openjdk-devel-21.0.0.0.35-1.rolling.fc38.x86_64 [olivares@fedora mptmp]$ javac Ulam.java --release 17 [olivares@fedora mptmp]$ java Ulam Enter any Number 23 Given Number is : 23 You are begining with number 23
70 35 106 53 160 80 40 20 10 5 16 8 4 2 1
Ulam count is 15 [olivares@fedora mptmp]$
Is there a better way to avoid doing this, ie removing java 17 and forcing 21 ? or vice versa to avoid this. I had not encountered this before in previous versions of Fedora it just worked! Now I have to specify. What would be the best thing to do? and make it work correctly.
Best Regards,
Antonio
On 9/26/23 10:21, olivares33561 via users wrote:
Is there a better way to avoid doing this, ie removing java 17 and forcing 21 ? or vice versa to avoid this. I had not encountered this before in previous versions of Fedora it just worked! Now I have to specify. What would be the best thing to do? and make it work correctly.
You could try removing 17 if nothing else depends on it. You could remove the rolling 21 release devel and install the 17 devel. You could switch the default java to 21/rolling using the alternatives command.
Sent from ProtonMail, encrypted email based in Switzerland.
Sent with Proton Mail secure email.
------- Original Message ------- On Tuesday, September 26th, 2023 at 12:44 PM, Samuel Sieb samuel@sieb.net wrote:
On 9/26/23 10:21, olivares33561 via users wrote:
Is there a better way to avoid doing this, ie removing java 17 and forcing 21 ? or vice versa to avoid this. I had not encountered this before in previous versions of Fedora it just worked! Now I have to specify. What would be the best thing to do? and make it work correctly.
You could try removing 17 if nothing else depends on it. You could remove the rolling 21 release devel and install the 17 devel. You could switch the default java to 21/rolling using the alternatives command. _______________________________________________
Interesting problem I have:
[olivares@fedora mptmp]$ sudo dnf remove java-17-openjdk-headless Dependencies resolved. ================================================================================ Package Arch Version Repo Size ================================================================================ Removing: java-17-openjdk-headless x86_64 1:17.0.8.0.7-1.fc38 @updates 205 M Removing dependent packages: libreoffice-calc x86_64 1:7.5.6.2-1.fc38 @updates 26 M libreoffice-emailmerge x86_64 1:7.5.6.2-1.fc38 @updates 25 k libreoffice-graphicfilter x86_64 1:7.5.6.2-1.fc38 @updates 1.0 M libreoffice-impress x86_64 1:7.5.6.2-1.fc38 @updates 1.7 M libreoffice-writer x86_64 1:7.5.6.2-1.fc38 @updates 12 M unoconv noarch 0.9.0-11.fc38 @fedora 250 k Removing unused dependencies: Box2D x86_64 2.4.1-9.fc38 @fedora 243 k autocorr-en noarch 1:7.5.6.2-1.fc38 @updates 286 k clucene-contribs-lib x86_64 2.3.3.4-45.20130812.e8e3d20git.fc38 @fedora 386 k clucene-core x86_64 2.3.3.4-45.20130812.e8e3d20git.fc38 @fedora 2.0 M google-carlito-fonts noarch 1.103-0.21.20130920.fc38 @fedora 2.6 M google-crosextra-caladea-fonts noarch 1:1.002-0.15.20130214.fc38 @fedora 251 k hyphen-en noarch 2.8.8-19.fc38 @fedora 104 k libabw x86_64 0.1.3-12.fc38 @fedora 271 k libcdr x86_64 0.1.7-12.fc38 @fedora 845 k libcmis x86_64 0.5.2-20.fc38 @fedora 1.1 M libe-book x86_64 0.1.3-30.fc38 @fedora 482 k libeot x86_64 0.01-28.fc38 @fedora 77 k libepubgen x86_64 0.1.1-15.fc38 @fedora 386 k libetonyek x86_64 0.1.10-9.fc38 @fedora 2.5 M libexttextcat x86_64 3.4.6-6.fc38 @fedora 458 k libfreehand x86_64 0.1.2-20.fc38 @fedora 441 k liblangtag x86_64 0.6.4-3.fc38 @fedora 223 k liblangtag-data noarch 0.6.4-3.fc38 @fedora 2.1 M libmspub x86_64 0.1.4-27.fc38 @fedora 408 k libmwaw x86_64 0.3.21-6.fc38 @fedora 6.7 M libnumbertext x86_64 1.0.11-2.fc38 @fedora 752 k libodfgen x86_64 0.1.8-8.fc38 @fedora 753 k liborcus x86_64 0.17.2-8.fc38 @fedora 1.6 M libpagemaker x86_64 0.0.4-20.fc38 @fedora 163 k libqxp x86_64 0.0.2-21.fc38 @fedora 326 k libreoffice-core x86_64 1:7.5.6.2-1.fc38 @updates 302 M libreoffice-filters x86_64 1:7.5.6.2-1.fc38 @updates 0 libreoffice-gtk3 x86_64 1:7.5.6.2-1.fc38 @updates 2.3 M libreoffice-gtk4 x86_64 1:7.5.6.2-1.fc38 @updates 2.1 M libreoffice-help-en x86_64 1:7.5.6.2-1.fc38 @updates 27 M libreoffice-langpack-en x86_64 1:7.5.6.2-1.fc38 @updates 172 k libreoffice-ogltrans x86_64 1:7.5.6.2-1.fc38 @updates 326 k libreoffice-opensymbol-fonts noarch 1:7.5.6.2-1.fc38 @updates 438 k libreoffice-pdfimport x86_64 1:7.5.6.2-1.fc38 @updates 588 k libreoffice-pyuno x86_64 1:7.5.6.2-1.fc38 @updates 1.7 M libreoffice-ure x86_64 1:7.5.6.2-1.fc38 @updates 6.7 M libreoffice-x11 x86_64 1:7.5.6.2-1.fc38 @updates 610 k libreoffice-xsltfilter x86_64 1:7.5.6.2-1.fc38 @updates 4.3 M librevenge x86_64 0.0.5-4.fc38 @fedora 757 k libstaroffice x86_64 0.0.7-10.fc38 @fedora 2.3 M libvisio x86_64 0.1.7-18.fc38 @fedora 680 k libwpd x86_64 0.10.3-16.fc38 @fedora 728 k libwpg x86_64 0.3.3-15.fc38 @fedora 166 k libwps x86_64 0.4.13-2.fc38 @fedora 2.1 M libzmf x86_64 0.0.2-29.fc38 @fedora 185 k lpsolve x86_64 5.5.2.0-31.fc38 @fedora 1.2 M mariadb-connector-c x86_64 3.3.5-1.fc38 @updates 580 k mariadb-connector-c-config noarch 3.3.5-1.fc38 @updates 497 mythes x86_64 1.2.5-2.fc38 @fedora 28 k mythes-en noarch 3.0-35.fc38 @fedora 21 M raptor2 x86_64 2.0.15-37.fc38 @fedora 576 k rasqal x86_64 0.9.33-22.fc38 @fedora 887 k redland x86_64 1.0.17-33.fc38 @fedora 517 k xmlsec1-nss x86_64 1.2.37-2.fc38 @fedora 206 k zxing-cpp x86_64 1.2.0-9.fc38 @fedora 1.2 M
Transaction Summary ================================================================================ Remove 62 Packages
Freed space: 654 M Is this ok [y/N]:
I guess I will need to just use your advice and leave it as it is. I do not want to remove libreoffice. I use it. Thanks to all who have explained how to deal with this issue. I had not encountered it before but was afraid to ask.
Best Regards,
Antonio
On 9/26/23 11:12, olivares33561 via users wrote:
Transaction Summary
Remove 62 Packages
Freed space: 654 M Is this ok [y/N]:
I guess I will need to just use your advice and leave it as it is. I do not want to remove libreoffice. I use it. Thanks to all who have explained how to deal with this issue. I had not encountered it before but was afraid to ask.
You could still try the alternatives option. "alternatives --config java"
On Tue, 26 Sep 2023, Samuel Sieb wrote:
On 9/26/23 11:12, olivares33561 via users wrote:
Transaction Summary
Remove 62 Packages
Freed space: 654 M Is this ok [y/N]:
I guess I will need to just use your advice and leave it as it is. I do not want to remove libreoffice. I use it. Thanks to all who have explained how to deal with this issue. I had not encountered it before but was afraid to ask.
You could still try the alternatives option. "alternatives --config java"
How would that work? It seems to me he has no version 17 compiler to go with the version 17 virtual machine. If he has a version 21 virtual machine, he could just soft link java21 to it.
On 9/26/23 15:47, Michael Hennebry wrote:
On Tue, 26 Sep 2023, Samuel Sieb wrote:
On 9/26/23 11:12, olivares33561 via users wrote:
Transaction Summary
Remove 62 Packages
Freed space: 654 M Is this ok [y/N]:
I guess I will need to just use your advice and leave it as it is. I do not want to remove libreoffice. I use it. Thanks to all who have explained how to deal with this issue. I had not encountered it before but was afraid to ask.
You could still try the alternatives option. "alternatives --config java"
How would that work? It seems to me he has no version 17 compiler to go with the version 17 virtual machine. If he has a version 21 virtual machine, he could just soft link java21 to it.
That's basically what my suggestion does. I'm not saying to change the compiler. The command I gave him gives the option to set the default "java" command to be the 21 version. Note the difference between "javac" and "java".
On Tue, 26 Sep 2023, olivares33561 via users wrote:
[olivares@fedora mptmp]$ rpm -qa | grep openjdk java-17-openjdk-headless-17.0.8.0.7-1.fc38.x86_64 java-latest-openjdk-headless-21.0.0.0.35-1.rolling.fc38.x86_64 java-latest-openjdk-21.0.0.0.35-1.rolling.fc38.x86_64 java-latest-openjdk-devel-21.0.0.0.35-1.rolling.fc38.x86_64 [olivares@fedora mptmp]$ javac Ulam.java --release 17 [olivares@fedora mptmp]$ java Ulam
Is there a better way to avoid doing this, ie removing java 17 and forcing 21 ? or vice versa to avoid this. I had not encountered this before in previous versions of Fedora it just worked! Now I have to specify. What would be the best thing to do? and make it work correctly.
I'd expect that within any sensible system, the java compiler and the java virtual machine would be compatible. The package java-17... seems to be an outlier and seems to be where the java virtual machine is coming from. If another package has a headless virtual machine, you might want to get rid of java-17... .