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-determinants/ 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? _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-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/users@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue