News for hackers. Stuff that matters.
Re:Ask HN: What is a modern Java environment? by omgmajk on Tuesday March 29, 2022 @09:24AM (#30842221)
IntelliJ Idea for sure.
Re:Ask HN: What is a modern Java environment? by sgt on Tuesday March 29, 2022 @09:32AM (#30842305)
Also using IntellJ. But how is the landscape with the other IDE's these days - is NetBeans keeping up?
Re:Ask HN: What is a modern Java environment? by the-alchemist on Tuesday March 29, 2022 @09:50AM (#30842501)
Netbeans died an unfortunate death once it moved to the Apache foundation and Sun/Oracle funding died out.

https://trends.google.com/trends/explore?date=today%205-y&q=...

Unfortunate, because it had (has?) a great Swing and UML editor, built-in for free.

Maybe I'm wrong and it's awesome now, but I haven't used it for a while in favor of Eclipse, and now, IntelliJ. This graph illustrates the IDE popularity between Intellij and Netbeans. IntelliJ became preferred over Netbeans about mid 2014.

https://trends.google.com/trends/explore?date=all&geo=US&q=i...

Re:Ask HN: What is a modern Java environment? by adalu on Tuesday March 29, 2022 @10:12AM (#30842768)
Netbeans was really great, maybe still is, but the noise jetbrains made with the astroturfing advertizing has jetbrains dominating everything.

IMHO Netbeans was ahead of idea in many ways. But since they didn't buy commenteers to hype their product it's pretty much nowhere, at least I don't know anyone who uses it.

Re:Ask HN: What is a modern Java environment? by efdee on Tuesday March 29, 2022 @11:50AM (#30844148)
I'm someone who has regularly recommends Jetbrains software (including IntelliJ and Resharper) to others in comments, and now I'm wondering if they forgot to send me my check.
Re:Ask HN: What is a modern Java environment? by thfuran on Tuesday March 29, 2022 @10:00PM (#30850719)
I think I'm regarded as something of an intellij zealot at work but now a bunch of people have switched. Hopefully I'll receive my check soon.
Re:Ask HN: What is a modern Java environment? by omgmajk on Wednesday March 30, 2022 @03:20AM (#30852316)
I too lack a check.
Re:Ask HN: What is a modern Java environment? by sgt on Tuesday March 29, 2022 @12:18PM (#30844545)
I know developers who still use it, but they refuse to give IntelliJ a chance.
Re:Ask HN: What is a modern Java environment? by watwut on Tuesday March 29, 2022 @09:40AM (#30842393)
I am using it now because the team is using it, but cant figure out in which way it is supposed to be better then Eclipse. It looks somehow better, but it seems strictly inferior in terms of what it does for me.
Re:Ask HN: What is a modern Java environment? by teknopaul on Tuesday March 29, 2022 @10:03AM (#30842656)
I find both mysteriously stop working on a project for a while so I keep them both. Eclipse has far better refactoring. IntelliJ refactors text files that are not Java and can easily break stuff when eclipse refactors are always safe. IntelliJ updates text strings but it's not always correct in doing so, é. G. A comment that says "_don't_ use a.b.C" might get refactored. In eclipse you can often safley "code backwards" i.e. break an API and then fix all the red dots, usually with auto fix options. IntelliJ misses a lot of necessary fixes until you compile. That can add hours of work to a big change.
Re:Ask HN: What is a modern Java environment? by jbellis on Tuesday March 29, 2022 @10:04AM (#30842666)
I'm very curious to hear what Eclipse does that IntelliJ does not match.
Re:Ask HN: What is a modern Java environment? by jillesvangurp on Tuesday March 29, 2022 @11:27AM (#30843881)
Incremental and partial Java compilation. Partial compilation is the notion that partially compiled software is still usable and something you can debug or introspect on. The IDE compiles while you type, it will detect syntax problems and as soon as you fix them they go away. Error markers in intellij are nowhere near as fast and you can't trust their presence or absence to be correct either.

Intellij does that a little bit of incremental compilation. They half integrated the eclipse Java compiler at some point but they never really made using it a thing. Most projects just hand off compilatio to Gradle or maven, which means you lose a lot of time waiting for that and dealing with various caches in intellij and gradle/maven getting out of sync with each other. The process for fixing that generally involves boiling the oceans and running the CPU at 400% for a few minutes.

Eclipse compiles two orders of magnitudes faster when you have it properly setup. I'm not exaggerating. It's really good at this. Intellij users have never seen this level of performance. I've tried to explain it a few times to users that insisted they had intellij configured just right. The minimum execution for a unit test after a 1 character code change is the key benchmark for this. Run a test, change something trivial, run it again. If that takes more than half a second and has a noticeable delay, it's not fast. Eclipse user to be closer to 50-100ms. Even on a (now) ten year old laptop. With intellij, it's closer to 3-5 seconds. They have improved things over the years but it never got even close to that level of performance.

Re:Ask HN: What is a modern Java environment? by jbellis on Wednesday March 30, 2022 @05:44PM (#30861190)
Thanks, that sounds very cool. As you say, intellij basically hands this off to gradle or maven. Does Eclipse interpret those natively or do you have to reproduce your maven build in the Eclipse gui?
Re:Ask HN: What is a modern Java environment? by watwut on Tuesday March 29, 2022 @02:46PM (#30846733)
Compilation of everything, how it shows compile errors and warnings. I see them in tree, in list, easily and quickly all of them. All of them for whole project at once and trustworthy. Less bogus warnings and contraproductive suggestions.

I never needed to fiddle with "command line shortener" ridiculousness in Eclipse.

Better code navigation and discovery. Eclipse always finds everything, every called and callee to depth. Same with inheritance. Even where Idea has same views, for some reason they hide it and only former Eclipse users stumble on it.

Actually safe refactorings. Idea occasionally "refactors" by creating bugs.

I had some cases where Idea simply formats code wrong. And it was impossible to configure to formát it right.

Also, Eclipse compile by default. It is ridiculous to have to remember to press shortcut to compile in modern IDE. I know it is configurable, but still ridiculous default.

Square selection.

Re:Ask HN: What is a modern Java environment? by teknopaul on Tuesday March 29, 2022 @10:15AM (#30842804)
Elipse keeps a complete Java representation of the source code in memory, (not the classes) that's why it can find compile errors before saving. This comes at the cost of lost of RAM, some projects are just too big for eclipse so IntelliJ is your only option. But that eclipse model can be used for lots of cool tricks, you have access to it in the plugin API, so for example you can enforce coding standards before even saving code.
Re:Ask HN: What is a modern Java environment? by nradov on Tuesday March 29, 2022 @12:09PM (#30844408)
I would argue that if a project can't fit into Eclipse with 32 GB RAM then perhaps the code base has become too large to manage and ought to be split into separate projects with dependencies.
Re:Ask HN: What is a modern Java environment? by teknopaul on Wednesday March 30, 2022 @01:14PM (#30858050)
In eclipse java code is generally already split into projects, in a workspace, you can close projects to save ram.

When you can get it all in memory, you get the benefits of eclipse refactoring, when you can't you don't.

Ability to write code that is safe to refactor is one of the great things about Java, so it's a shame if you can't benefit from that.

Re:Ask HN: What is a modern Java environment? by self_awareness on Tuesday March 29, 2022 @09:51AM (#30842513)
And what are the functions that you use that work better in Eclipse?
Re:Ask HN: What is a modern Java environment? by teknopaul on Tuesday March 29, 2022 @10:09AM (#30842737)
Eclipse immediately tells you what is broken when you change an api. IntelliJ does not.

You can't stop IntelliJ from saving work. I like to kick of a build, and work on some new stuff while it's going on without saving until the build completes. That workflow is impossible in IntelliJ. You have to down tools, for a long build with lots of tests that can make IntelliJ slower over all. IntelliJ generally more responsive for most work, but that's because it's not using Java's type system to find errors as you work, errors are deferred, which often means they take longer over all to fix.

Re:Ask HN: What is a modern Java environment? by ta988 on Tuesday March 29, 2022 @10:46AM (#30843234)
It just takes two check boxes to uncheck to disable that in IntelliJ. I agree it is disturbing that it is a default at first. But it is at least configurable.
Re:Ask HN: What is a modern Java environment? by teknopaul on Wednesday March 30, 2022 @01:17PM (#30858090)
Which version? It wasn't possible last time I checked and Jetbrains had close-no-fix on various related bug reports.
Re:Ask HN: What is a modern Java environment? by ta988 on Thursday March 31, 2022 @03:26PM (#30871289)
Last EAP version but it was there at least since last year.
Re:Ask HN: What is a modern Java environment? by watwut on Tuesday March 29, 2022 @02:51PM (#30846801)
Eclipse shows me all errors in whole project at once. This is biggest one. The hierarchy and callers hierarchy always work, I can rely on them way more then in Idea where they sometimes miss things.

Much much better full text search. I can search through multiple projects. Not just root.

Square selection.

Re:Ask HN: What is a modern Java environment? by kkjjkgjjgg on Tuesday March 29, 2022 @10:00AM (#30842619)
It costs money, so it is a value statement about you as a developer. Either you are "worth it for your employer", or you are "worth it for yourself".

(I personally still use Eclipse)