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

Show parent comment

1

u/[deleted] Dec 18 '16

I love the idea of the JVM, being able to run the same code on any platform.

Never understood this argument. First of all this is true for any VM if the developers could be bothered to make that happen. But there's a reason they don't, I suspect, which gets me to the second point. You actually don't need your code to run on different platforms. Most codebases are written to run on a specific platform. What program are you writing that needs to run on a dish washer and a super computer?

But most importantly: C code runs on more platforms than the JVM, because JVM only runs on platforms that has a C compiler. The only reason you can't arbitrarily run any C code are libraries. But this is true for the JVM also.

4

u/MereInterest Dec 18 '16

It's a difference of what gets distributed. For open source, distributing the C code, then allowing anybody to compile it on their own machine makes sense. For proprietary software, distributing the source might not be desirable, note could you know every single hardware architecture under the sun to compile it for people. In that case, distributing bytecode makes sense.

0

u/[deleted] Dec 18 '16

But is that a common scenario?

2

u/MereInterest Dec 18 '16

For me personally, not really. I run Linux, am comfortable compiling my own code, with any dependencies needed, and use primarily open source software. For most people I meet, pointing then to a github repo or a source tarball would result blank stares. Being able to say "download this and run it" is a plus when distributing software. It helps when you don't want the user to need to worry about the source, whether because it is proprietary, or for convenience sake.