object-oriented programming language
Java is a high-level, general-purpose, memory-safe, object-oriented programming language. It is intended to let programmers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support … Wikipedia
🌐
Back4App
blog.back4app.com β€Ί home β€Ί learn β€Ί top 10 java alternatives
Top 10 Java Alternatives - Which is the best?
December 14, 2023 - This article will explore ten of the best Java alternatives. The list includes Kotlin, Python, Scala, Golang, Rust, Javascript, etc.
🌐
AlternativeTo
alternativeto.net β€Ί software β€Ί java
Best Java Alternatives: Top Programming Languages in 2025 | AlternativeTo
The best Java alternatives are Python, JavaScript and C++. Our crowd-sourced lists contains more than 50 apps similar to Java for Linux, Windows, Mac, BSD and more.
🌐
Slashdot
slashdot.org β€Ί software β€Ί p β€Ί Java β€Ί alternatives
Top Java Alternatives in 2026
Find the top alternatives to Java currently available. Compare ratings, reviews, pricing, and features of Java alternatives in 2026. Slashdot lists the best Java alternatives on the market that offer competing products that are similar to Java.
Rating: 5 ​ - ​ 1 votes
🌐
Hackr
hackr.io β€Ί home β€Ί articles β€Ί programming
Java Alternatives: The Most Popular Java Competitors of 2026
January 30, 2025 - Looking for an alternative to Java? We cover the ten best Java alternatives, from Kotlin to Go.
🌐
Igalia
blogs.igalia.com β€Ί dpino β€Ί 2011 β€Ί 10 β€Ί 13 β€Ί configuring-different-jdks-with-alternatives
Configuring different JDKs with alternatives - Unweaving the Web
$ sudo alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_25/bin/java 1000 Β· Now if we list the alternatives for β€˜javaβ€˜.
🌐
Coursesity
coursesity.com β€Ί blog β€Ί top-java-alternatives
Top Java Alternatives in 2025 : 15 Programming Language
December 27, 2024 - Alternatives such as C#, Python, and JavaScript are popular choices for developing web and mobile applications. These languages can provide different advantages over Java, such as better performance, more features, and more flexibility.
🌐
TMS Outsource
tms-outsource.com β€Ί home β€Ί top java alternatives for modern developers
Top Java Alternatives for Modern Developers - TMS Outsource
April 3, 2026 - This guide examines top Java substitutes that balance familiarity with innovation. We’ll compare options ranging from JVM languages like Kotlin and Scala to completely different ecosystems including Python, Go, and C#. You’ll discover which alternatives excel for web development, mobile development, and backend development while learning about crucial factors like community support, hiring market demand, and language adoption trends.
🌐
SourceForge
sourceforge.net β€Ί software β€Ί product β€Ί Java β€Ί alternatives
Best Java Alternatives & Competitors
Compare Java alternatives for your business or organization using the curated list below. SourceForge ranks the best alternatives to Java in 2025.
Rating: 5 ​ - ​ 1 votes
Find elsewhere
Top answer
1 of 12
84

Assuming one has installed a JDK in /opt/java/jdk1.8.0_144 then:

  1. Install the alternative for javac

    $ sudo update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.8.0_144/bin/javac 1
    
  2. Check / update the alternatives config:

    $ sudo update-alternatives --config javac
    

If there is only a single alternative for javac you will get a message saying so, otherwise select the option for the new JDK.

To check everything is setup correctly then:

$ which javac
/usr/bin/javac

$ ls -l /usr/bin/javac
lrwxrwxrwx 1 root root 23 Sep  4 17:10 /usr/bin/javac -> /etc/alternatives/javac

$ ls -l /etc/alternatives/javac
lrwxrwxrwx 1 root root 32 Sep  4 17:10 /etc/alternatives/javac -> /opt/java/jdk1.8.0_144/bin/javac

And finally

$ javac -version
javac 1.8.0_144

Repeat for java, keytool, jar, etc as needed.

2 of 12
76

You will notice a big change when selecting options if you type in "java -version" after doing so. So if you run update-alternatives --config java and select option 3, you will be using the Sun implementation.
Also, with regards to auto vs manual mode, making a selection should take it out of auto mode per this page stating:

When using the --config option, alternatives will list all of the choices for the link group of which given name is the master link. You will then be prompted for which of the choices to use for the link group. Once you make a change, the link group will no longer be in auto mode. You will need to use the --auto option in order to return to the automatic state.

And I believe auto mode is set when you install the first/only JRE/JDK.

Top answer
1 of 6
536
Confusing error messages: Clojure's error messages more often than not are very confusing. They usually involve stack traces that do not thoroughly explain where the error was caused or what caused it. | Immutability is the default: Clojure programmers are highly encouraged to use immutable data in their code. Therefore, most data will be immutable by default. Β· State change is handled by functions (for transformations) and atoms (an abstraction that encapsulates the idea of some entity having an identity). | Minimal syntax: Being a LISP, programs are simple: they're just functions and data. That it doesn't get bogged down with syntax or the loftier FP concepts like monads makes it one of most approachable functional languages for beginners. | Tries to solve problems as simply as possible: Simplicity is one of the pillars on which Clojure is built. Clojure tries to solve many problems in software development as simply as possible. Instead of building complex interfaces, objects or factories, it uses immutability and simple data structures. | Good for writing concurrent programs: Since Clojure is designed for concurrency, it offers things like Software Transaction Memory, functional programming without side-effects and immutable data structures right out of the box. This means that the development team can focus their energies on developing features instead of concurrency details. | Huge ecosystem of libraries to work with: There's a very large ecosystem of high-quality Clojure libraries which developers can use. One example is Incanter. It's a great data analytics library and a very powerful tool for dealing with matrices, datasets and csv files. | Code tends to be nightmare to maintain for non-authors: Tendency to devolve into difficult to manage mess of styles. Not recommended for professional use. | Too cult-ish: Way too niche and in-group behavior, while trying to trash other languages. Only pays for select few, who run the "game" on others. | Cross platform: Clojure compiles to JVM bytecode and runs inside the JVM. This means that applications written in Clojure are cross-platform out of the box. | Rich Hickey: The creator is so awesome, he's a feature. Just look up his talks and see why. | Dynamic language: A superb data processing language. While rich type and specification systems are available they are optional. | Tied to the JVM and it's limitations: Some language constructs were obviously created as workarounds for JVM limitations. This makes the language much less elegant than it could have been. Β· Also, the JVM has a very cumbersome FFI. | Syntax can be alien / jarring for those used to other Lisps: Perhaps some may consider this attribute an advantage, but I do not. Clojure does not attempt to maintain significant compatibility with other Lisps. So, if you already know a Lisp or are used to the way Lisp works in general, you'll probably be confused if you take a look at Clojure. See these resources for more details on this subject: Β· - https://clojure.org/reference/lisps Β· - http://stackoverflow.com/q/6008313/2636454 Β· - http://gilesbowkett.blogspot.com/2015/01/one-major-difference-between-clojure.html Β· - http://softwareengineering.stackexchange.com/q/153128/166211 | Extensible: Clojure has an elegant macro system which enables language additions, Domain-specific languages (DSLs), to be created much easier than most other languages (with the exception of Racket, perhaps). | Great tool used in automating, configuring and managing dependencies available: Leiningen is a very useful tool for Clojure developers. It helps wiht automation, configuration and dependency management. It's basically a must for every Clojure project. | No C/Java syntax: Refreshing, BTW! | Game is available with which you can learn Clojure: Nightmod is a tool used to make "live-moddable" games. It displays the game's code while you are playing and allows you to inject new code using Clojure. This can be a fun and useful experience for people trying to learn Clojure. | Dynamic types: You can put anything in. This makes reasoning about code after a time has passed very hard.
2 of 6
333
Statically typed programming language for the JVM, Android and the browser.Statically typed programming language for the JVM, Android and the browser.Great tooling support: Since Kotlin is made by Jetbrains (the developers of IntelliJ IDEA) so it stands to reason that the IntelliJ support for Kotlin is also great. Besides that, Kotlin also works well with existing Java tools such as Eclipse, Maven, Gradle, Android Studio, etc... | Easy adoption for existing Java programmers: Kotlin runs on the JVM and Java interoperability has been one of the main objectives since the language was born. It runs everywhere Java does; web servers, mobile devices (Android), and desktop applications. It also works with all the major tools in the Java ecosystem like Eclipse, IntelliJ, Maven, Ant, Gradle, Spring Boot, etc. Β· All of this makes adoption extremely easy even for existing Java projects. On top of this there's also ensured Type safety and less boilerplate code needed. | May be hard for programmers already used to imperative style to learn functional programming from Kotlin: Since Kotlin does not enforce any particular paradigms and is not purely functional, it can be pretty easy to fall back to imperative programming habits if a programmer comes from an imperative background. | Easy to learn if you have prior programming experience: Kotlin's syntax is extremely easy to understand. The language can be picked up in a few hours just by reading the language reference. | No runtime overhead: The standard library is relatively small and tight. It mostly consists of focused extensions of the Java standard library and as such adds no additional runtime overhead to existing Java projects. | Officially supported for Android development: Starting with version 3.0 of Android Studio, Kotlin support will be built-in. This means that it's now easier than ever to use Kotlin for existing Android projects or even start writing Android apps only with Kotlin from scratch. Β· This also means that Kotlin and Kotlin plugins for Android Studio will be fully supported in the future and their likelihood of being abandoned is quite small since Google is fully embracing the language for their Android ecosystem (alongside Java and C++). | Low-risk adoption for existing Java codebases: Since it has such a good interoperability with Java, Java libraries, and Java tools. It can be adopted for an existing Java codebase at little to no cost. The codebase can be converted from Java to Kotlin little by little without ever disrupting the functionality of the application itself. | Does not impose a particular philosophy of programming: It's not overly OOP like Java and it does not enforce strict functional paradigms either. | Is built to solve industrial problems: Kotlin has been designed and built by developers who have an industrial background and not an academic one. As such, it tries to solve issues mostly found in industrial settings. For example, the Kotlin type system helps developers avoid null pointer exceptions. Reasearch languages usually do not have `null` at all, but APIs and large codebases usually need `null`. | The need for Java interoperability has forced some limitations: The need to make Kotlin interoperable with Java has caused some unintuitive limitations to the language design.
🌐
TutorialsPoint
tutorialspoint.com β€Ί java-alternatives
Java Alternatives
July 26, 2023 - C# is as powerful as Java and any kind of application can be developed by using the language. C# is also a secure language and has similar syntax as that of Java. C# is compatible with Windows and Mac while Java is also compatible with Linux.
🌐
AppDesk Services
appdeskservices.com β€Ί home β€Ί top 8 java alternatives
Top 8 Java Alternatives - 2024
April 28, 2026 - Are you tired of the same old Java? Venture into a world of diverse languages built for the JVM, each offering unique strengths. Best Java Alternatives are...
🌐
ITAA
itaa.com β€Ί home β€Ί the best oracle java alternatives in 2026 – and how to transition
The Best Oracle Java Alternatives in 2026 – and How to Transition - ITAA
2 weeks ago - The right alternative will depend on your organisation’s size, technical needs, support requirements, and appetite for change. ... Sources: OpenJDK Download – Corretto – AWS, Introducing Amazon Corretto, a No-Cost Distribution of OpenJDK with Long-Term Support | AWS Open Source Blog ... Sources: Introducing the no-cost IBM Semeru Runtimes to develop and run Java applications – IBM Developer, Semeru Runtime Downloads – IBM Developer, Semeru Runtimes installation
🌐
StackShare
stackshare.io β€Ί java β€Ί alternatives
Best Java Alternatives in 2025
Using MATLAB, you can analyze data, develop algorithms, and create models and applications. The language, tools, and built-in math functions enable you to explore multiple approaches and reach a solution faster than with spreadsheets or traditional programming languages, such as C/C++ or Java.
🌐
Baeldung
baeldung.com β€Ί home β€Ί installation β€Ί switch between multiple java versions
Switch Between Multiple Java Versions | Baeldung on Linux
March 18, 2024 - $ update-java-alternatives --list java-1.17.0-openjdk-amd64 1711 /usr/lib/jvm/java-1.17.0-openjdk-amd64 java-1.21.0-openjdk-amd64 2111 /usr/lib/jvm/java-1.21.0-openjdk-amd64 java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64
Top answer
1 of 4
213
sudo update-alternatives --config java

Configures the default for the program "java". That's the Java VM.

sudo update-alternatives --config javac

Configures the default Java compiler.

You can also see that, because the first command lists a lot of "JRE" (Java Runtime Environment) folders and the Program is just called "java".

If I check which version is being used by issuing the command java -version or javac -version, I can see, that each command changes the program being used.

However, using update-java-alternatives with a JDK Version changes both programs for me. Using the first commands, you can use a Java VM and Java Compiler from different JDKs.

update-java-alternatives requires presence of a file with extension .jinfo in directory /usr/lib/jvm. The openjdk package is shipped with a .jinfo file, the jdk of Oracle (formerly Sun) is not. As alternative, you configure alternatives without update-java-alternatives:

For example, to add java from jvm-directory /usr/lib/jvm/jdk-12.0.1 (default directory of Debian package of Oracle) with priority 2082, use the following command:

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-12.0.1/bin/java 2082

As for switching for different development environments:

Are you talking about starting the IDE itself with different Java versions or using different versions in the IDE for compilation and running your app?

  • For 1.: You can specify which JVM to use in the eclipse.ini, as described here. I don't know how to do that for the Arduino IDE.

  • For 2.: In Eclipse you can select the JRE/JDK to be used in Window -> Preferences -> Java -> Installed JREs. And under Java -> Compiler you could choose an older Java compliance if you wish.

EDIT: This DigitalOcean page also has a very nice explanation of everything related to Java on Ubuntu.

2 of 4
36

update-java-alternatives is a program to update alternatives for jre/jdk installations.

update-alternatives is a symbolic link management system for linux (I'm sure there is little news here).

You can, and really should, use both update-java-alternatives and update-alternatives together.

Firstly, be sure to have the all the alternatives configured correctly. java and javac are but a few. There is javadoc, rmic, serialver and others, substituting the above variables for: native2ascii and /opt/jdk1.8.0_40/bin/native2ascii should report if the alternative is installed and/or selected.

When all the alternatives are configured you can then create links in /usr/lib/jvm to your manual instalation.

In order to configure update-java-alternatives you must use a hidden file with the same name as your directory but prefixed by a . (dot).

Hope this helps.

Bibliography

man -S 8 update-java-alternatives

http://tech.lanesnotes.com/2008/03/using-alternatives-in-linux-to-use.html

https://stackoverflow.com/questions/6477415/how-to-set-oracles-java-as-the-default-java-in-ubuntu

🌐
Azul
azul.com β€Ί home β€Ί products β€Ί core β€Ί oracle java alternatives: oracle java se vs. the challengers
Oracle Java Alternatives: Comparing the Top 4 Competitors | Azul
March 24, 2026 - Click to learn about the five java alternatives to Oracle which are Azul Core, Red Hat OpenJDK, Amazon Corretto, Eclipse Temurin and AdoptOpenJDK.
🌐
ExamSnap
examsnap.com β€Ί home β€Ί top java alternatives in 2025: explore the best programming languages beyond java
Top Java Alternatives in 2025: Explore the Best Programming Languages Beyond Java - ExamSnap
December 15, 2025 - In Part 1, we examined several major alternatives like Kotlin, Python, Rust, JavaScript, and C++. In this section, we broaden the scope by exploring even more programming languages that offer unique capabilities and are viable replacements for Java in various development scenarios.
🌐
DEV Community
dev.to β€Ί thegroo β€Ί install-and-manage-multiple-java-versions-on-linux-using-alternatives-5e93
Install and manage multiple Java versions on Linux using alternatives - DEV Community
February 10, 2022 - sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/azul-open-jdk-17/bin/javac 2 ... sudo update-alternatives --install /usr/bin/jshell jshell /usr/lib/jvm/azul-open-jdk-17/bin/jshell 2 Β· Now that you have the new JDK installed and configured you can easily switch between versions using: ... Pick the number of the version you want from the Selection list.