News for hackers. Stuff that matters.
Re:Which version of JDK should I use? by shartacct on Sunday October 10, 2021 @03:35PM (#28821271)
There's no real reason to use java for new development in 2021.
Re:Which version of JDK should I use? by chrisseaton on Sunday October 10, 2021 @04:27PM (#28821663)
Java has a better technology stack. The JVM is light-years ahead of the .NET runtime.
Re:Which version of JDK should I use? by azth on Sunday October 10, 2021 @11:18PM (#28824284)
Are you referring to its GCs, compilation tiers, or observability? ;)
Re:Which version of JDK should I use? by shmel on Sunday October 10, 2021 @03:51PM (#28821413)
Err... Not defending Java, but does .NET support Linux at all?
Re:Which version of JDK should I use? by shade on Sunday October 10, 2021 @04:01PM (#28821502)
Yes - .NET 5 and 6 both have runtimes and SDKs available for Mac and Linux. At least in my opinion, Linux is the preferred deployment platform for it now unless you have a specific (usually older) library that only works on Windows.
Re:Which version of JDK should I use? by erik_seaberg on Sunday October 10, 2021 @07:40PM (#28822974)
.NET 5 finally delivered Linux support but only eleven months ago, so I would test it some before betting the farm.
Re:Which version of JDK should I use? by SideburnsOfDoom on Monday October 11, 2021 @03:14AM (#28825655)
> .NET 5 finally delivered Linux support but only eleven months ago

The previous versions in this stream (.NET Core 2.1, .NET Core 3.0 and 3.1) also run fine on Linux. For web server / API server workloads, it's been stable for a lot longer than 11 months, and people do indeed "bet the farm" or "run the business" on it, quite happily.

Technically, this starts with .NET core 2.1 on 2018-05-30. The prior version, 2.0, released on 2017-08-14, wasn't _quite_ there yet although some people were happy with it for production use.

Re:Which version of JDK should I use? by irperez on Monday October 11, 2021 @08:16AM (#28827460)
.NET has been on Linux for years now. And my company is using it in production on Kubernetes (Linux/Debian). Its crazy how dependable and fast it is. Startup times are amazing and its only getting better each year. We're looking to upgrade to .NET 6 in production by January.

Have you even seen the benchmarks compared to Java and other languages?

https://www.techempower.com/benchmarks/#section=data-r20&hw=...

If you're not paying attention to .NET its time to get your head out of the sand, seriously.

Re:Which version of JDK should I use? by dustinmoris on Tuesday October 12, 2021 @02:24AM (#28836674)
I can also confirm that I’ve been using .NET on non Windows OSes for years and it works really well. However the Benchmarks are rigged. The code they wrote for that one benchmark for in the top is a complete cheat. Check out the source and compare it with the other ones from the top 10. .NET is fast but Java is truthfully still faster.
Re:Which version of JDK should I use? by 5e92cb50239222b on Monday October 11, 2021 @04:26AM (#28826059)
I've been using it exclusively on Linux since 2.0. Both running and developing.
Re:Which version of JDK should I use? by SideburnsOfDoom on Monday October 11, 2021 @11:29AM (#28829443)
> exclusively on Linux since 2.0.

.NET Core 2.0 (August 2017) we assume.

Re:Which version of JDK should I use? by 5e92cb50239222b on Tuesday October 12, 2021 @08:53AM (#28839035)
That was implied. The original NET 2.0 was never available on Linux. Mono used a different versioning scheme IIRC.
Re:Which version of JDK should I use? by rsj_hn on Sunday October 10, 2021 @03:55PM (#28821440)
Re:Which version of JDK should I use? by tester756 on Sunday October 10, 2021 @04:34PM (#28821725)
.NET Core is main support for Linux for .NET
Re:Which version of JDK should I use? by zamalek on Monday October 11, 2021 @11:04AM (#28829117)
The question was "at all." .Net has been available on Linux for ~18 years.
Re:Which version of JDK should I use? by seedie on Sunday October 10, 2021 @04:02PM (#28821515)
Re:Which version of JDK should I use? by dmsch on Monday October 11, 2021 @05:56AM (#28826597)
Yes, since 5 years (.NET Core 1.0)
Re:Which version of JDK should I use? by shartacct on Sunday October 10, 2021 @04:01PM (#28821511)
Yes. It's ported to every mainstream CPU architecture and OS.
Re:Which version of JDK should I use? by matsemann on Sunday October 10, 2021 @03:52PM (#28821416)
Then use Kotlin, and take advantage of the jvm and the ecosystem, and avoid basically all the stuff you listed about the java language.

"no real reason" is a stupid take. I could list multiple, but a big one is that there are hundred java developers for each dotnet developer in my city. The java env is well tested and well understood, if anything one should argue why not use it instead of a hip and trendy alternative.

Re:Which version of JDK should I use? by Zababa on Sunday October 10, 2021 @04:54PM (#28821891)
Their point about using .NET were not really valid since one of the big and best reason to use Java is that you already have a Java codebase, but things like value types and generics without type erasure aren't solved in Kotlin, so Kotlin isn't really a good answer to his not really valid point.
Re:Which version of JDK should I use? by ptx on Sunday October 10, 2021 @05:44PM (#28822254)
> things like value types and generics without type erasure aren't solved in Kotlin

Perhaps not solved, but at least partially addressed with value classes[1] and reified type parameters[2].

[1] https://kotlinlang.org/docs/inline-classes.html

[2] https://kotlinlang.org/docs/inline-functions.html#reified-ty...

Re:Which version of JDK should I use? by shartacct on Sunday October 10, 2021 @04:04PM (#28821530)
> take advantage of the jvm

In what way? It's slower and has less features than the .NET runtime.

> "no real reason" is a stupid take. I could list multiple, but a big one is that there are hundred java developers for each dotnet developer in my city. The java env is well tested and well understood, if anything one should argue why not use it instead of a hip and trendy alternative.

So, your only credible excuse for using java is inertia from boomers and middle managers refusing to adapt from the standard of the early and mid 2000s?

Re:Which version of JDK should I use? by Zababa on Sunday October 10, 2021 @04:57PM (#28821916)
> So, your only credible excuse for using java is inertia from boomers and middle managers refusing to adapt from the standard of the early and mid 2000s?

If you come in and freely migrate all of the Java codebases to .NET while maintaining code quality and functionalities, I'm sure many people would let you do it. If you don't understand why people stick to one language, that means that you've never worked on a big codebase, or completly ignore the business side of the developer job. In both cases, that's a lack of wisdom on your part.

Re:Which version of JDK should I use? by shartacct on Sunday October 10, 2021 @06:52PM (#28822697)
I guess you missed the 'new development' part of my original comment? Obviously it would be nonsensical to port a large extant codebase to a new language and tech stack if it's just being maintained.
Re:Which version of JDK should I use? by ptx on Sunday October 10, 2021 @03:47PM (#28821370)
Here is one real reason to prefer it over .NET Core: https://github.com/dotnet/sdk/issues/6145
Re:Which version of JDK should I use? by tester756 on Sunday October 10, 2021 @04:33PM (#28821723)
why actually? what does it send?
Re:Which version of JDK should I use? by ptx on Monday October 11, 2021 @05:32AM (#28826445)
In the past it has sent command line arguments and the path of the current working directory, among other things, according to comments on that issue. Even if Microsoft doesn't intend to deliberately collect sensitive data, they don't seem to think it's worth putting much effort into preventing accidental data leaks from broken anonymization, unreliable opt-out mechanism, etc.
Re:Which version of JDK should I use? by sneeeeeed on Sunday October 10, 2021 @03:57PM (#28821461)
Java is way better than .net, which nobody at all uses outside MS. Certainly not in enterprise.
Re:Which version of JDK should I use? by Zababa on Sunday October 10, 2021 @04:58PM (#28821922)
> Certainly not in enterprise.

Lots of people use .NET in enterprise, I don't know where you got that impression.

Re:Which version of JDK should I use? by ahtihn on Monday October 11, 2021 @02:34AM (#28825414)
There's tons of .net usage in enterprise, what are you talking about?
Re:Which version of JDK should I use? by tester756 on Sunday October 10, 2021 @04:35PM (#28821740)
>Certainly not in enterprise.

pretty odd take, in which country?

Re:Which version of JDK should I use? by Case81 on Monday October 11, 2021 @06:20AM (#28826707)
yeah, you got it. My city has very little job listings requiring .NET for actual back-ends. Whereas, there are like a thousand Java jobs and almost half mentioning Spring