r/embedded • • Sep 09 '23

What is this obsession with JAVA at university?

I read so many posts where people say 'Java' and then give Javascript examples - I also see many queries about learning Java.

Have I missed something, JAVA as it stands is almost dead - its a nothing in the Embedded world. Are universities confusing JavaScrit and JAVA, or are they really peddling that relic JAVA

EDIT: Thanks! its been very interesting viewpoints.

1 Upvotes

30 comments sorted by

50

u/ThockiestBoard Sep 09 '23

Embedded is not everything? For better or worse, Java is very much alive in many traditional software companies. Even Netflix has Java in there IIRC.

Java can be good for universities. At least the one I went to, much of the general programming courses I took were centered around understanding an object-oriented paradigm approach to programming. We used C++, but Java could have been just as well for our uses.

Confusing Java for JavaScript is someone not knowing what they are talking about, its whatever

4

u/[deleted] Sep 09 '23

We started with Python and transitioned to Java then C. I find Java to be much more "universal" as you can easily branch to Python, C, C++, etc...

36

u/remy_porter Sep 09 '23

It is expensive and time consuming to change the curriculum for an entire program. So if one were in a CS program, it's likely a lot of the choices about what languages are taught in which sections were set over a decade ago.

Java was selected because of its heavy emphasis on Object Oriented design, and its industry application- which make no mistake, Java is not dead. Java is heavily used in finance and insurance, and will be for some time to come. No, it's not used in embedded, but your undergraduate program isn't going to make you specialize in embedded programming- it's going to teach you to program. It's worthwhile for that purpose.

5

u/[deleted] Sep 09 '23

In the past, I've worked on a project running java on embedded linux device. The company wanted to de-risk developping hardware and writting c code for an embedded device. The Application was super simple and so they didn't need the determinstic speed of c code

5

u/remy_porter Sep 09 '23

Once upon a time, that was an actual goal of Java- by putting your code into the JVM, it could run on low-end devices like refrigerators and toasters.

1

u/ViatoremCCAA Jan 15 '25

Didnt really take off

18

u/Just_Fuel8214 Sep 09 '23 edited Sep 09 '23

Java is pretty much alive and has a lot of modern language features.

But the problem is like the C++ curriculum at universities: It's stuck in the C++97 standard or even older. Nobody works with that old crap anymore. Is more or less a different language now.

C++23 brought a lot of incredibly useful features for embedded stuff.. and it starts really to feel "hardware native" now.

8

u/redska_ Sep 09 '23

that's absolutelly true.

but i want to point one thing out. i've had teacher that clarify the fact that the language proposed during a course is not important, most coursed are not focused to teach a language. the main aim of a course is to teach some aspect of language feature and a style of programming. so, for example, if the aim of the course is OOP and you use java, some of the features of java will never pointed out beacause you focus on OOP and maybe on a short intro to basic programming.

9

u/Turbulent_Public_i Sep 09 '23

It's a solid language to learn programming principles, and for that, you should learn programming through java first. Once you're passed the data structures and algorithms part, you're free to branch out to whatever you want. Learning programming from C and C++ is like jumping into the Atlantic to learn how to swim, you might theoretically survive, but why did you do that to yourself.

6

u/HendrixLivesOn Sep 09 '23

I strongly agree. Java is great for learning and even for enterprise. I went to C after, and a lot of that was easy to pick up.

7

u/edparadox Sep 09 '23

For better or worse, Java has a pretty exhaustive standard library, is cross-platform, is an OOP-enforced language (which is a most desirable knowledge for several courses), not to mention, contrary to your claim, very much alive in the industry.

While I personally do not like Java, the above criteria match most of the needs for programming courses.

Javascript is vastly different from Java and should not be confused with the latter.

Finally, having a specialty, especially for university's degrees, does not mean everything needs to revolve around it.

-3

u/mosaic_hops Sep 09 '23

I haven’t seen Java used intentionally in over a decade. I have heard it’s still used to support legacy applications at some big companies… the exhorbitant licensing fees make it difficult to transition to something modern. But using Java for anything new is a non-starter for any sane organization.

3

u/TheReddditor Sep 09 '23

Why is everyone talking about “exorbitant license fees”? That’s simply FUD. Only if you use certain versions of the Oracle runtime you need to pay up. Java is certainly useable for free. And is still being used. Also for new projects; it’s dependable, well-known, well useable and many people know how to use it.

1

u/[deleted] Sep 09 '23

Spring Boot is still pretty widely used + openjdk

5

u/chemhobby Sep 09 '23

I was taught java at university and actually I think it's a pretty solid choice pedagogically. Sure it's not directly applicable to many embedded systems but the fact is most students aren't going to end up working in embedded anyway.

9

u/josh2751 STM32 Sep 09 '23 edited Sep 11 '23

Java is not dead at all. It’s not relevant in the embedded world, but go to any bank and they’re definitely using Java all over the place. Java is actually a reasonably nice language to develop in. A bit easier than C/C++, a lot more performant than Python.

And no, JavaScript and Java have nothing to do with each other.

4

u/KnightBlindness Sep 09 '23

Java is still quite popular in the web and applications world. It also is relatively simple and has similar syntax to C/C++ like languages so it makes for a solid language to teach beginning programmers without getting bogged down with memory allocation, pointers, etc.

3

u/HendrixLivesOn Sep 09 '23

Counterpoint... at work, I use assembly, C/C++, python, java, and javascript. Java is very much alive at the enterprise level.

2

u/fawlen Sep 09 '23

Java is not dead, it is still one of the most used languages. Schools use Java in their curriculum mainly bexause OOP is still very common and the easiest way to teach it is to use a OOP-forst language. In Java everything is an object, and it relies on the concepts of OOP for it's entire design paradigm.

Consider what language can substitute Java in teaching object oriented programming? It will need to have a class system, inheritence, interface, virtual classes and more. Java is probably the simplest language that has those features, C# and C++ also have them but imo Java is simller to understand..

Another reason I can think of is its much easier to go from staticly typed languages to dynamically typed then the other way around.. My uni teaches CS101 with python, which is great for beginners, but makes reading harder when the code gets longer unless you enforce python typings (its hard to keep track of what data types are needed for each function when the type isnt specified). The order in my uni is python, c, c++, java but alot of universities do java, c, c++ where im from which, in retrospect, is better imo.

2

u/regularwills Sep 09 '23

I think some universities are making the switch away from Java. I only had to take one Java class at community college and the rest was C++ fortunately. Now I’m at a state school and it’s all Java but my department is in talks to transition to another language. I guess when a curriculum has been set up for more than a decade it is harder to make that initial switch. Also, Java is still abundant in the wild based on job searches alone.

1

u/FAANGsAndNails Sep 09 '23

It’s a solid example of OOP language

1

u/[deleted] Sep 10 '23

You dont see so many of such posts at all. 20 years ago, maybe....

1

u/NjWayne Sep 11 '23

This was THAT bad 2+ decades ago when I took CS. Fortunately I focused on C/Asm and processor architecture. You have to get used to learning what you want on your own

CS != Programming.

Software is used largely to test and prove out the theory

1

u/BenkiTheBuilder Sep 09 '23

When I went to university, my introductory courses used Modula, a language that never had any real world significance. My brother's courses used SML. Professors use whatever language they think works well to communicate basic concepts. I consider Java a bad choice not because of its lack of significance but because it requires so much boiler plate stuff that distracts from the core concepts.

1

u/Humble_Anxiety_9534 Sep 09 '23

java run time is no longer free for business use. so our company virtually banned us installing it. if it is not dead it soon will be. Android is moving away from it as well.

2

u/TheReddditor Sep 09 '23

Bullshit. Maybe the one from Oracle. There are many others.

1

u/Humble_Anxiety_9534 Sep 17 '23

which other ones. I should tell my IT.

1

u/TheReddditor Sep 17 '23

https://www.baeldung.com/oracle-jdk-vs-openjdk

Pretty ok summary. Read to the end please…

-1

u/[deleted] Sep 10 '23

"Java is almost dead". Stopped reading this nonsense post, clearly a clueless person.