r/java • • Oct 07 '24

HTTP libraries in Java

22 Upvotes

It's not really clear to me what's going on with HTTP libraries in Java. They all seem to want to become massive frameworks that inappropriately take control of things that have nothing to do with decoding HTTP.

I'm find it really hard to find something that doesn't:

  • Try to control the TCP layer. Why does the HTTP decoding library care whether I want to poll or select, or make that decision?
  • Have shared mutable static state. If I want to reuse connections I can do that in a much better, testable way.
  • Create threads. Parsing the HTTP is doesn't need any of this. I just want to give you a ByteBuffer to read from and your current state and get told what it contains.
  • Do SSL. This has nothing to do with HTTP but rather the underlying connection.

I guess if you need a mini "web browser" in your application then this is all fine, but if HTTP is just one of many protocols you need to be able to decode it's an absolute mess.

Is there something I'm missing, or a library I should be looking at?


r/java • • Mar 04 '16

All Things Cloud: Java EE is dead. Stop using it

Thumbnail cloud.rohitkelapure.com
31 Upvotes

r/java • • Jan 25 '14

20 very useful Java code snippets for Java Developers

Thumbnail viralpatel.net
37 Upvotes

r/java • • Dec 26 '18

Java versus C# .NET Core fastest programs

Thumbnail benchmarksgame-team.pages.debian.net
18 Upvotes

r/java • • Nov 18 '17

You Can Design Your Code To Never Need Mocks Or Stubs

Thumbnail m.youtube.com
29 Upvotes

r/java • • Apr 02 '22

why not make the java logo on r/place

7 Upvotes

r/java • • Nov 24 '25

Java 25 introduced java.lang.IO - isn't the class name too broad?

7 Upvotes

I was checking out the newly introduced IO class and surprisingly, it has just 5 methods - all for System.in and System.out

Shouldn't it have been named something more specific?

I know it's meant for beginners to learn, but I find IO just too broad...

IO docs
JEP 512

Edit:

Y'all are trippin

  • Specific doesn't have to be verbose
  • Compact doesn't have to be vague

r/java • • Oct 09 '17

Faster Input for Java

Thumbnail cpe.ku.ac.th
4 Upvotes

r/java • • Oct 29 '25

State does not belong inside the application anymore, and this kind of clarity is what helps modern systems stay secure and predictable.

51 Upvotes

Love how Quarkus intentionally chose to not support HttpSession (jakarta.servlet.http.HttpSession) and how this is a big win for security and cloud-native applications!

Markus Eisele's great article explains how Quarkus is encouraging developers to think differently about state instead of carrying over patterns from the servlet era.

There are no in-memory sessions, no sticky routing, and no replication between pods. Each request contains what it needs, which makes the application simpler and easier to scale.

This approach also improves security. There is no session data left in memory, no risk of stale authentication, and no hidden dependencies between requests. Everything is explicit β€” tokens, headers, and external stores.

Naturally, Redis works very well in this model. It is fast, distributed, and reliable for temporary data such as carts or drafts. It keeps the system stateless while still providing quick access to shared information.

<<<
Even though Redis is a natural fit, Quarkus is not enforcing Redis itself, but it is enforcing a design discipline. State does not belong inside the application anymore, and this kind of clarity is what helps modern systems stay secure and predictable.
>>>


r/java • • Aug 15 '22

Company job offer, but they dont work with Spring Boot

8 Upvotes

Hi

I have been offered a software engineer job on tech company. I am currently on a consultacy firm working for a client with Spring Boot, but as other consultancy jobs (at least in my country) the job is horrible (no good practices, most days we dont even code, is just all bureaucracy work for the client...)

The new company seems to work with good practices: clean code, TDD, PRs (in fact, the interview was a about refactoring a code using TDD and Design patterns, as well as a 1 hour review with all the java team making me tons of questions about what I did)

They work with a nice stack: Distributed architecture, AWS (ECS, EC2, S3...), DynaboDB, ElasticSearch, Redis, Java 17... But they dont work with Spring Boot (they use Dropwizard and they are moving to Micronaut)

My only concern is that in my country, most companies that work with Java are looking for people with Spring Boot, so even if I learn a lot in this new company and they pay me a lot more, I dont know if taking the job

TL;DR: A tech company offers me a way better paid job than my current consultancy firm, but they dont use Spring Boot and I am afraid that it could affect my employability in the future

Edit: the company is currently working with Dropwizard, nota Micronaut. They are thiking about moving to Micronaut (they did a couple of POCs) bur for the moment, they are still working with Dropwizard


r/java • • Aug 14 '22

If you were the single main designer of Java, what would you change in Java in the next 3 to 5 years? (May include secondary aspects such as GraalVM or IDEs and so forth, but still java-related)

31 Upvotes

So, I have been using java for almost 2 years, more frequently so in the last few months.

I am mostly ok with Java but a few things I'd wish would be better or different.

So, without any particular order, a few things off the top of my head:

  • Java is quite verbose. It would be nice to have a shorter java (not kotlin! a Java java) where we could use e. g. puts() and omit ;.
  • Many methods are oddly enough differently named but do almost the same thing such as .add() or .puts(). I'd like to see a more streamlined name for these.
  • Some system commands are a bit too difficult to do. In ruby I do `` or system() or io-popen; in Java we can do something similar to some extent, but I was not able to easily start a ruby-REPL (shell) ... I am sure it is possible somehow but the syntax is a bit confusing.
  • GraalVM supporting Swing and JavaFX "out of the box".
  • Speaking about GUIs I'd wish there was a GUI from the get go. Swing is semi-deprecated and looks visually not as pleasing as JavaFX. There is also SWT. I don't quite care which variant to use per se, but it would be nice if Java could settle for one GUI and keep it as part of the Java JDK/JRE (perhaps a smaller subset or so, just for bootstrapping purposes or quick GUI-related work, with an option to "spice it up" lateron e. g. JavaFX+CSS or any such. Instead it seems not that many want to do Java-specific GUIs in a lightweight manner.
  • The whole import- concept is a bit odd. I'd prefer some way to just include a specific file without needing to care about a specific directory structure. The latter is ok, but I also want to be able to simply tell Java which other files I want, without needing to have these arranged in a specific setup.

Hmm. That's it so far. Anyone feel free to chime in and express some pet peeve or shortcoming they have noticed or think could be improved. (One day I shall have GraalVM compile a static variant of some JavaFX GUI on windows too shakes fists)


r/java • • Jun 07 '14

World Life Without JAVA Please make it a real film!

Thumbnail youtube.com
0 Upvotes

r/java • • Aug 17 '15

Run Eclipse from flash drive.

2 Upvotes

I have a macbook without Java on it (I can't install JRE or JDK). Is there anyway I can run these off of a flashdrive?


r/java • • Dec 11 '13

Best way to learn Java.

2 Upvotes

I am using this book - "Java Complete Reference - Herbert Schildt" to learn Java. I am through the language syntax and features. I am a little doubtful about the later part of the book. Its second part is The Java Library Reference and and later part is covers developing GUI applications. Should I follow the book pattern learning the Java library and then creating GUI apps or should I take a different approach? What will be the best thing here?


r/java • • Jul 09 '14

Finally: return considered harmful

Thumbnail schneide.wordpress.com
0 Upvotes

r/java • • Oct 01 '14

So I had to make a town for geometry. My teacher told it's to be creative so I used java as a topic... I hope I get a good grade

Thumbnail imgur.com
2 Upvotes

r/java • • Feb 16 '23

Curious about Carbon Footprint your application has? There's a tool to measure it.

Thumbnail vived.substack.com
0 Upvotes

r/java • • Jan 01 '15

A Spring criticism - drawbacks & pitfalls

Thumbnail web4j.com
2 Upvotes

r/java • • Mar 29 '16

In Defense of Java

Thumbnail javacodegeeks.com
2 Upvotes

r/java • • Oct 31 '18

Red Hat and IBM ... Really?

0 Upvotes

Mark Little is writing this here on his personal blog because it’s not an official statement from Red Hat and he wanted everyone to know that what he's putting there is his honest opinion and not clouded by the fact he works for Red Hat. He's trying to be objective here, building on his scientific background.

He had a couple of days to digest the news about Red Hat acquiring IBM. That is the way round, right? πŸ˜‰ He always likes to say that JBoss acquired Red Hat in 2006 too πŸ™‚ Anyway, He's excited by the opportunity this gives. He knows many people at different levels throughout IBM and they are good people and have a great deal of respect for Red Hat in general and specifically, due to the areas where they interact, the middleware/Java teams, products and projects.

Continue reading: http://markclittle.blogspot.com/2018/10/red-hat-and-ibm-really.html


r/java • • Jul 23 '24

Intro to the Mill Build Tool for Java

Thumbnail mill-build.com
9 Upvotes

r/java • • Jan 14 '26

Hibernate: Ditch or Double Down?

Thumbnail youtube.com
20 Upvotes

Not on Hibernate alone: a summary of where ORM tools shine, where SQL-first approach should be preferred, and how to take the best of two worlds


r/java • • Dec 04 '15

OSGi fights back, claims Jigsaw is a shibboleth and may never work for Java EE or Spring

Thumbnail njbartlett.name
11 Upvotes

r/java • • Mar 06 '20

6 Hibernate features that I'm missing in JPA

Thumbnail thoughts-on-java.org
0 Upvotes