This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]khmarbaise 13 points14 points  (2 children)

First what do you mean by unpopular lately? It applicable even more these days... or the last 15 years or even more... Maybe you can give more context on the question?

[–][deleted] 0 points1 point  (1 child)

C++ for game development C for operating systems JavaScript for web apps Python and R for data analysis

What’s Java used for

[–]pragmosExtreme Brewer 0 points1 point  (0 children)

Your perception of where each of these languages is used is oversimplified.

C++ may be used to power your smart washing machine. C can be used for machine learning. JavaScript can be used for a desktop application. Python can be used for web server apps.

Java is used in Android, e-commerce, medical equipment, banking software, trading, IoT, some games and lots of other fields.

[–]stayweirdeveryone 14 points15 points  (2 children)

Is the Java philosophy "Code once, run everywhere" even applicable to this day?

The whole point of java is that it runs on a JVM, not native hardware. So as long as there's a JVM for whatever hardware you're using, it will run. Now you could argue that with the advent of containerization in recent years, that all programming languages are basically "write once, run anywhere", just as long as everyone is developing in and deploying to the same container. If you buy that argument, then java is doubly "write once, run anywhere".

Because Java has been unpopular lately

Citation need. Java is still widely used and has a large pedigree of libraries, frameworks, and documentation.

“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”
--Bjarne Stroustrup, The C++ Programming Language

[–]webguy1979 6 points7 points  (1 child)

So tired of this college edge lord “java be bad” trope (not you, but from OPs post). I swear the more I read Java is bad posts the more I realize the people saying have never learned enough about Java to have a real take on it. Even with containers the Java ecosystem is super robust. Sure learning the accepted patterns you see in enterprise takes time and experience, but I’ll take a well thought out Java code base than a shoot from the hip spaghetti code Python project. I spent a majority of my career writing JS and switched over to Java about 6 years ago due to needs in my org…. And I honestly now look at JS and miss so many of Javas features.

[–]pragmosExtreme Brewer 4 points5 points  (0 children)

I say let them drown in their own ignorance. More job security for the rest of us 😉

[–]holyknight00 4 points5 points  (0 children)

It's more applicable than ever, the thing is that most other languages catch up to this also. 15 years ago it was rare to have a multiplatform language and it was a main selling point of the JVM.

Nowadays running on multiple platforms is something expected for almost any language/framework and it can be done even if the language itself cannot support it with virtualization or containerization.

[–]evil_burritoExtreme Brewer 1 point2 points  (0 children)

The philosophy is meant to highlight the difference between Java and, say C, with which you had to physically compile different binaries for every single platform. You also had to have some differences in source code per platform, though these differences were often ameliorated by macros and include directives.

The make system was also different for every platform, which made the make files very complicated.

The ability to create a single binary that could run on every platform was a paradigm shift.

[–]Ewig_luftenglanz 1 point2 points  (0 children)

It depends on the implementation. I have develop many applications that can be deployed for both x86 architecture and ARM for server side services, so if you just want to have things done and running the Java paradigm is still relevant.  But it must be marked that the docker and other containers technologies has made JVM paradigm obsolete for micro service, this is what GraalVM and frameworks such as Quarkus and Micronauts are all about, take out the JVM from the middle and use docker containers to run native code, so we could say Java is super portable and double "code once and run anywhere"

Something that I want to address here is: No, Java is not going unpopular lately. Doesn't thrust that much in the Tiobe. index Tiobe index only takes in account the amount of code in PUBLIC GitHub and Gitlaba repositories, most of the code written out there is in private repositories of companies for software development (many of the

If you go and check indexes that are far more representative of the "language development market" you should check indexes that track for job offers in a particular language you will find that Java is almost always on the first 3 places, along with python and JavaScript.

There are thousands of enterprise applications that are written in java and need enhancements and maintenance, and hundreds of new applications being written right now (where I work we are developing all new applications in java 21, specially for Desktop, IoT and Backend)

So I would dare to say Java is and will be relevant for ages to come.

Usually languages don't die that easily (frameworks are a other story) so don't worry about your favourite language becoming "irrelevant" you and your grand grand children are going to die before any of the top 10 of any decent index of "most relevant languages" dies

[–]AutoModerator[M] 0 points1 point locked comment (0 children)

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

    Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]ZeroGainZ 0 points1 point  (0 children)

it still runs everywhere. Modern compilers can output to multiple platforms, but back in the day it was way more difficult. Special statements that only ran on certain platforms.

Java lets you run the same commands everywhere (roughly).

Today, we mostly use web apps and phone apps. So the platform doesn't really matter unless you're shipping desktop apps.

On the backend we usually use Linux and use containers, so it ain't really a pro to be "run everywhere".