13 ms·
Java 8 still widely used
- Jimmc414 3y agoMight have something to do with the $30 per seat license cost of Java v9+
- water9 3y agoAnd the fact that you have to rename everything to Jakarta and rebuild dependencies
- yardstick 3y agoThis is the biggest issue. No issues with licensing - openjdk and others are perfect for production use for the vast majority (imo). Some supermassive projects excluded but they are always outliers. The migration path after 8 is just a pain, As you mentioned, package. The name changes are for no benefit to developers or end users.
- skissane 3y agoI use Java 11 (actually Eclipse Temurin/Adoptium, formerly known as AdoptOpenJDk) with bits of Java EE 8, it works fine. (Not using the whole EE stack, just select components such as servlets and JAX-RS.) Tried upgrading to Jakarta EE, got hit by needing to upgrade dozens of random open source libraries to newer versions with Jakarta EE support, some of which had breaking changes which have nothing actually to do with Jakarta EE. I’m sure it will get finished eventually. I recently joined an AI team (platform/infrastructure/apps rather than the actual data science proper) and since then I’m trying to do less and less in Java and more and more in Python-so that mess may be left for someone else to resolve. But Python contains dependency hells of its own
- manyxcxi 3y agoTHIS is the real problem. For _most_ projects upgrading from 8 to 9 meant just adding a few packages that were removed from default JDK with Jigsaw. That part is generally fine, even with OSGi hell. The Javax -> Jakarta changes for validation, EE, XML, etc. are a damn nightmare!
- seanthemon 3y agoAnd if you're using microservices it's either a total migration (a no go for anyone minimizing bugs and outages), or a slow one-by-one trudge, if you use some commons between them that commons will need to support both javax and jakarta together, superbly fun
- manyxcxi 3y agoYou just described my last 6 weeks…
- mleo 3y agoThere is a gradle plugin that can rewrite jar dependencies class files to be jakarta packages from javax. This makes updating your code the major issue versus also figuring out every dependency at once.
- water9 3y agoWould you happen to know the name of this plug in? It would be a great help
- nogridbag 3y agoShout out to Quarkus which uses OpenRewrite recipes to automatically modify your source files for you. Upgrading to the latest Jakarta EE was basically a single command.
- water9 3y agoThat is fantastic news Thank you for posting.
- scrapcode 3y agoOracle's new "Universal Subscription" pricing structure is even more ridiculous at $180/yr per employee in your company.
- treyd 3y agoHow does that not turn into making a technically-separate legal entity with just the product as an asset and no employees that's wholly owned by a parent company that it also buys development contracts for the product from?
- scrapcode 3y agoGreat point! For one, this is not something the Government can do - which I'm sure is a large Java customer.
- ivanjermakov 3y agoIsn't OpenJDK provides the same functionality and is FOSS?
- little_hermit 3y agoAdoptium OpenJDK is the way to go.
- 1letterunixname 3y agoAzul Zulu. Much lower probability of GC pauses. :]
- reactordev 3y agoCorretto
- 1letterunixname 3y agoC4 GC > Amazon non-upstreamed fixes http://www.azul.com/wp-content/uploads/c4_paper_acm.pdf http://www.azul.com/wp-content/uploads/c4_paper_acm.pdf
- junon 3y agoJava 8 (maybe 9) is the last version I wrote code for. Having looked at recent new Java features it looks like a completely different language now. I also see a lot less new projects written in Java, at least in the OSS sphere. Just anecdotal.
- manishsharan 3y agoAnother anecdotal factoid ... Not a single LLM based example on GitHub seems to be using Java.
- Onawa 3y agoHow well can you access graphics drivers and cuda cores for doing any kind of local large language model stuff using java? I know that there is a project called MLC for machine learning compilation that is meant to be written in Python and then transcribed using machine learning to a native language for the platform so that you can use mobile processors and laptops and stuff more efficiently for small language models.
- water9 3y agoJava has the Java native interface where you can interface with c/c++ written code
- nradov 3y agoJNI is kind of a hassle. If most of the heavy lifting is being done by native code then using Java becomes pointless. Might as well just go with Python which makes calling native code a bit easier.
- cempaka 3y agoProject Panama is meant to make this a lot nicer, and they often explicitly mention trying to stay competitive in machine learning as a key impetus for it. But yeah, JNI is so awful even the language architects are compelled to trash it and apologize for how bad it is.
- rch 3y agoThe ASF world is finally moving forward. Java 11 is pretty much ubiquitous, and I'd expect latest LTS versions to be supported by default going forward.
- 1letterunixname 3y agoBasically, pick an LTS version and stick to it for a given use. Legacy is going to pick 8 (or maybe 6 or 7 for very old stuff), green field may opt for 21, and others should select 11 or 17 depending on vendor recommendations and support.
- zappb 3y agoIndeed, many ASF projects are finally using newer Java releases as a baseline. Even Commons projects are getting updated!
- benatkin 3y ago[flagged]
- jojobas 3y agoRussia is next to China, but there's little common in the way their computing realms work. Jetbrains would of course know as they make the best Java IDE and gather stats, but they could do it from anywhere.
- oofta-boofta 3y ago[dead]
- w10-1 3y agoFor context on possible sampling error: - 50% use Java 8 - 72% use Spring - 74T use Maven - 78% use IntelliJ - 38% develop web site If it works, don't touch it.
- water9 3y agoTomcat is underrated as a web server. One of the most reliable I’ve ever used. one relatively low traffic tomcat instance has been up for over three years consecutively
- maltalex 3y agoThe reason is obviously Java 9 which broke compatibility in many areas https://www.oracle.com/java/technologies/javase/9-relnotes.html#JSERN9 https://www.oracle.com/java/technologies/javase/9-relnotes.h...
- josephg 3y agoThe mistake of python 3 must never be forgot.
- nradov 3y agoIt was painful, but most of the community doesn't consider it a mistake.
- 1letterunixname 3y ago"Mistake"? There was 2to3, a clear timeline, and a migration path. Compatibility forever drags along tech debt the way Microsoft did. On the other extreme, Apple is guilty of breaking things too aggressively without enduring compatibility. Major version incompatibilities with clear advantages is righteous churn, so it's a narrow path that must balance competing concerns. Perl 5 -> Perl 6 is the oddball without a migration path because they're totally different.
- earthboundkid 3y ago2to3 was a bungle. Python 3 was dead until six came out, which had an actual plan for upgrading that works (forward compatibility) instead of automatic rewriting, which does not work.
- DaiPlusPlus 3y ago> On the other extreme, Apple is guilty of breaking things too aggressively without enduring compatibility. Apple views that as a good thing.
- 1letterunixname 3y ago
- Someone1234 3y ago.Net has the same problem[0] 45% still "regularly use" .Net Framework because, like Java 8, .Net Core broke compatibility and even in spite of Microsoft's efforts to offer upgrade routes, it is still a hugely painful experience. Particularly for those stuck on libraries like Asp.Net. Their current best solution is to put a modern version wrapper around .Net Framework and to map between them, but that isn't exactly ideal either (since you wind up with a giant mess). [0] https://www.jetbrains.com/lp/devecosystem-2023/csharp/ https://www.jetbrains.com/lp/devecosystem-2023/csharp/
- ocdtrekkie 3y agoI actually prefer using .NET Framework for even fresh projects of mine if they are going to run on Windows anyways: Microsoft provides security fixes for new .NET LTS versions for only three years, so your application bitrots rapidly. Meanwhile, .NET Framework 4.8 is several years old and will almost certainly still be getting security updates ten years from today. To be clear, Microsoft provides better support today for Visual Basic 6 than it does many versions of the modern .NET.
- TillE 3y agoModern open-source .NET feels like a totally different community and ecosystem compared to .NET Framework. The Ballmer era focus on Windows, versus Nadella embracing cross-platform software. The old stuff will stick around for basically the same reasons that people still write C/C++ software using Win32.
- steve1977 3y ago> The old stuff will stick around for basically the same reasons that people still write C/C++ software using Win32. Because the resulting applications are much better?
- signaru 3y agoWith my C# codes not heavily tied to specific .Net frameworks, it's not really affected by breaking compatibilities. However I avoid the latest IDE (VS 2022) which come with the latest frameworks as the IDE is often noticeably slower.
- ergonaught 3y agoYou use a Mac. You search for java. You click the first result and go to java.com. You click Download Java. You are given Java 8. You are now somehow a mystery.
- MuffinFlavored 3y agohttps://www.java.com/en/download/ https://www.java.com/en/download/ They are not lying...
- throwitaway222 3y agobrew install java export PATH="/opt/homebrew/opt/openjdk/bin:$PATH" java -version openjdk version "21.0.1" 2023-10-17
- michaelsbradley 3y agoThe instructions change a bit over time, with macOS upgrades and changes re: brew itself, but in my experience brew has a superb track record of making sure the `brew info` instructions are an exact match for what you need to do for your setup. One macOS Sonoma 14.1.1 just now: $ brew info java ... For the system Java wrappers to find this JDK, symlink it with sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk openjdk is keg-only, which means it was not symlinked into /usr/local, because macOS provides similar software and installing this software in parallel can cause all kinds of trouble. If you need to have openjdk first in your PATH, run: echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> /Users/[username]/.bash_profile For compilers to find openjdk you may need to set: export CPPFLAGS="-I/usr/local/opt/openjdk/include" ...
- acomjean 3y agoI feel for Java. Everytime I've used it, I've been pleasantly surprised by the language. It has some truly amazing features (steams where very cool). Then I get to the tooling and it's just such a pain, if it's working we don't touch it. Our repository was checked in "eclipse format". Tried to move it to jetbrains. No dice. it too, me a few days to get it so i could compile and run under eclipse. I'm not an expert but I don't want to touch it for fear of breaking. New projects aren't done in Java. Php perl and python have a better dependency story, though slower.
- nwellinghoff 3y agoThey key is to use a build system like Maven, ant etc. such that the IDE does not matter. On most java projects you would add ide specific files to the git ignore list. Eg your ide project and settings are for you and you only.
- jamesfinlayson 3y agoThis - I remember Eclipse putting me off Java for years. IntelliJ is so much better, and if you use Maven or Gradle, the IDE really does just figure it out for you.
- beeboobaa 3y agoJust use maven like everyone else and you will have better portability than most languages manage to offer, and freedom of IDE (if you want to use one).
- chii 3y ago> Php perl and python have a better dependency story none of those have a better dependency manager than java's maven. The fact that the project you had to work on didn't use maven isn't evidence that java's tooling is bad! of all the current industry wide languages, java is the one with the best tooling, including IDEs, profiling and tracing, deployment options, and debugging and logging etc.
- catach 3y ago
- roschdal 3y agoJava 8 is the best Java.
- mooreds 3y agoConcur. Another data point. Our open source JWT library[0] and Java client library[1] both target Java 8 because that is widely used. 0: https://github.com/FusionAuth/fusionauth-jwt https://github.com/FusionAuth/fusionauth-jwt 1: https://github.com/FusionAuth/fusionauth-java-client https://github.com/FusionAuth/fusionauth-java-client
- chriscjcj 3y agoNinite.com lists the following Java installs: 64-bit Java Runtime (JRE) 8u392-b08 32-bit Java Runtime (JRE) 8u392-b08 64-bit Java Runtime (JRE) 11.0.21 64-bit Java Runtime (JRE) 17.0.9 64-bit Java Runtime (JRE) 21.0.1 How is the average person to know which one is best for them and why?
- hypercube33 3y agoWhichever runs Minecraft of course. I think that's Java 8
- cesarb 3y agoIIRC, latest Minecraft uses Java 17, and won't run on Java 8; on the other hand, IIRC older Minecraft versions (which are still popular) require Java 8, and won't run on anything newer.
- znpy 3y agoCobol is still widely used as well, so what?
- Svetlitski 3y agoThis is unfortunate considering how far the language has come since then. Local variable type inference (i.e. the `var` keyword) is very difficult to give up once you’ve gotten used to this being table-stakes in basically every other modern statically typed language.
- esafak 3y agoThe Java I encountered at work didn't even use Java 8's features. People balked when I suggested using vavr to get some functional programming goodness. The culture around Java is conservative; it has a lot of inertia. That's why I support Kotlin; it forces project contributors to leave their dated habits behind. Java libraries still work, of course.
- timcavel 3y ago[dead]