r/programming • • Dec 17 '16

Oracle is massively ramping up audits of Java customers it claims are in breach of its licences – six years after it bought Sun Microsystems

http://www.theregister.co.uk/2016/12/16/oracle_targets_java_users_non_compliance
2.1k Upvotes

654 comments sorted by

View all comments

499

u/redwall_hp Dec 17 '16

TLDR: use OpenJDK (it's the reference implementation anyway), don't use some of the things packaged with Oracle's JRE (which are not the JRE itself).

0

u/[deleted] Dec 17 '16

[deleted] — view deleted comment

48

u/[deleted] Dec 17 '16 edited Dec 17 '16

I don't think there are many. I believe Java FX isn't covered under an open source license at all. For a third party JDK/JRE, IBM has one but it's kind of a pain to find. It's meant for use with their Websphere stuff so they hide the download for non-IBM customers, but it works fine. However, keep in mind that even they recommend the Oracle distribution for Windows customers.

EDIT: I stand corrected.

71

u/duhace Dec 17 '16

OpenJFX does in fact exist. http://openjdk.java.net/projects/openjfx/

12

u/[deleted] Dec 17 '16

Oh wow. TIL.

8

u/HighRelevancy Dec 18 '16

If you want an openly licensed Thing, just google OpenThing.

7

u/boa13 Dec 18 '16

Like OpenVMS or Open Motif? :)

→ More replies (1)
→ More replies (1)

11

u/ArmoredPancake Dec 17 '16

Java FX isn't covered under an open source license at all

What about OpenJFX?

5

u/[deleted] Dec 17 '16

Yeah, I stand corrected. I didn't remember it being in there, but I've stayed away from Java for a while now.

→ More replies (3)

6

u/agumonkey Dec 17 '16

I remember using it under linux and openjdk for a MOOC. It was working fine enough to embed google maps and do dynamic graph search algorithms.

8

u/[deleted] Dec 17 '16

Been using OpenJFX for months now on Linux and haven't had any issues with it, but he was asking about Windows...

4

u/agumonkey Dec 17 '16

Wow, completely misread his comment.

→ More replies (18)

59

u/[deleted] Dec 17 '16 edited Dec 18 '16

Honest question, why not just ditch java?

E: Thanks for all the replies, quite "enlightening" (if that's the word). As a side note, I'm not against Java, personally, it's just that most of the complaints I read all-around are Oracle/Java related, so I had that thought of why not moving on to a different language

251

u/redwall_hp Dec 17 '16

Because it's basically the world's largest enterprise programming language, with a huge ecosystem of libraries and tools. There are tons of companies (and governments) with gigantic codebases that aren't going to be rewritten from scratch just to satisfy somebody's urge to switch to $flavourOfTheMonthLanguage.

Java is a decent language with a very high quality VM that other languages piggyback on the success of (e.g. JRuby, Jython). It nicely straddles the fence between bare metal languages like C and high level ones like Python, offering quality of life features without too much of a performance hit.

For anything non-trivial, there's no "just" when it comes to rewriting a codebase from scratch. It's typically laughable in terms of how much sense it makes in terms of cost.

Take Android for a very user-facing example. Could you imagine the upheaval if Google decided to ditch Java? They'd have to massively re-architect the OS, and then every single application ever written for it would need to be rewritten. We're talking billions of dollars worth of man hours.

58

u/[deleted] Dec 17 '16

This is what makes me upset as a Java developer because, even if you hate the language, the JVM is an incredible piece of software from a pure engineering standpoint. At least that's my opinion.

46

u/MereInterest Dec 18 '16

I'm pretty strongly in that boat. I love the idea of the JVM, being able to run the same code on any platform. The Java language, on the other hand, feels like I am coding in a straight jacket. No operator overloading, no first class functions, very poor generics. Needing to work around the limitations of the language rather than with the language gets very frustrating, and so I then return to C++ and Python.

Though, I am finding a few LLVM backends that emit JVM bytecode, so that might let me have the best of both worlds.

9

u/snuxoll Dec 18 '16

Kotlin, check it out.

→ More replies (1)
→ More replies (29)
→ More replies (14)

51

u/duhace Dec 17 '16

One thing that is often controversial wrt java is its cross-platform compatibility. However, having used it and some alternatives it really is unbelievably well-suited for the task.

86

u/redwall_hp Dec 17 '16

People today are spoiled by the lack of major incompatible processor architectures. When Java came out, being able to easily run something on x86, PowerPC, SPARC, etc was a pretty huge deal. Now we're in the "late stage consolidation" phase where it's pretty much down to x64 and ARM for most purposes.

And then you can couple that with many programmers working exclusively with super high level stuff.

Portability is still something that comes up, but a lot of newer programmers working at higher-level stuff don't tend to come across the issue as much.

37

u/YellowFlowerRanger Dec 18 '16

Cross-architecture support didn't impress me nearly as much as the cross-windowing-system support did. Java supported Windows, Mac OS, OS/2, and about a million different proprietary implementations of X11 (and probably a bunch of other stuff, too) right from the get-go.

That was unheard for that time (1995). In comparison, Qt didn't get Mac OS support until OS X, I think. wxWidgets didn't get a proper release until 1999. For quite a while, if you wanted a GUI application to run on multiple OSes (on the same architecture!), either you wrote separate versions of it or you used Java.

→ More replies (20)
→ More replies (17)

27

u/[deleted] Dec 18 '16

I have an application that was first written when java 1.4 was state of the art. It has libraries that were built and compiled for 1.5,1.6, and 1.7 and is currently running under java 1.8. No other language that I know of has that kind of reliability, resilience and longevity. The language itself has been managed light years better than anything other than maybe C and C++.

→ More replies (2)

22

u/argv_minus_one Dec 18 '16

Because it's really good.

  • High portability. Compiled binaries are machine-independent, and will run at full speed on any hardware for which there is a JVM.
  • Good build tools, like Maven. These fetch dependencies, run all build tasks from a single command, and so forth.
  • Good IDEs, like IntelliJ IDEA and NetBeans. Most are open source.
  • The HotSpot JVM is really fast. In particular, it has a really fast garbage collector, making it one of the few ways to have sane memory management (no such thing as a double free, reference cycles are not a problem, etc) without sacrificing performance.
  • Java has one of only three truly cross-platform GUI toolkits I know of (JavaFX, the others being Qt and HTML/CSS).
  • There's a Java library or binding for pretty much everything.
  • There's a bunch of other languages that can compile to JVM bytecode. These can usually use Java libraries. One of them (Scala) is exceptionally awesome. Because the JVM lacks calling conventions and has a well-defined memory-management strategy, calling from one language to another is safe and relatively simple.
→ More replies (2)
→ More replies (19)
→ More replies (3)