r/linuxquestions • • Jun 12 '20

Resolved Why does everyone hate Java applications?

I see it generally everywhere I go as a Linux user: almost everyone has some kind of problem with Java applications. I understand Java as a development platform has some rather infuriating holes regarding its deployment methods, and the most common issue I've seen are memory leaks and just how memory hungry the applications can be by themselves.

Is it a concept of purity? Or is is just because of some other reason that seems to escape me? I use some Java applications almost daily without problems. So why the grudge?

Opinions, rather than absolute answers, are expected.

Resolved -- Technically, there have been several wonderful and informative answers here on this post. Some answer the question better than others. However, not one singular answer is fitting enough to answer this question, so I thank everyone who took the time out of their day to enlighten me about Java and its rather unfortunate history. Thanks again!

128 Upvotes

137 comments sorted by

View all comments

Show parent comments

5

u/Delta-9- Jun 12 '20

They reinvent the wheel with logging, and don't use standard system provided logging.

Holy fuck, this. I spent a week trying to get Tomcat to play nicely with Logrotate and finally gave up. For this reason alone, fuck Java and the NIC it rode in on.

1

u/gehzumteufel Jun 12 '20

Tomcat plays fine with logrotate. The key is to truncate the file instead of rotating the actual file. If you rotate the file, you just lose the logs because it attempts to still write to that deleted file.

1

u/vacri Jun 13 '20

It was a different java app, not Tomcat, but I had a problem with truncate-style logrotation in that the application would simply seek to the location in the file where the log 'should' be and write it there. This meant if I truncated a 10MB logfile, the next logline would be written after seeking 10MB into the file... filling it up with 10MB of zeroes...

1

u/gehzumteufel Jun 13 '20

Wow what a piece of shit app. That's really unfortunate.