SwayzePara: did you ever stop to ask why :/ seems youre opening yourself up to being a good robot
Swayzeif you did understand the underlying reason for not doing something that should be the reason not because 'you might've read it somewhere'
Swayzefeels like ..
ParaSwayze: Why to what?
ParaThe reasons for not using sun.* packages have been clear since time immemorial, and so are the counterarguments. I happened to agree from the get-go with the "don't" side.
ParaI've also used openjdk and other non Sun JDKs years ago where one couldn't rely on these classes existing/doing what they advertised to do exactly, so it has always been easier to just work with the given instead of trying to claim that I know better than the people who literally built the thing.
ParaAnd I'm sure I've transitively used something that did Weird and Dangerous things with sun.* classes, but I'm not responsible for other's choices in that regard either; if a dependency broke due to mystery issues (NIO in JDK7 springs to mind), it would get replaced.
* Bombe is firmly in camp Para on this one. :)
johnjayquestion. is there a way to use the lsp-server 'jdtls' with pre-21 versions of openjdk? the readme says version 21 is required, but this seems overly strict to me
ernimriljohnjay, what is the reason you want to use an old jdk?
johnjayi assume they are still used sometimes. 11 and 17 for example are available in debian, and my mint system came with 11 installed by default
johnjayfortunately debian allows multiple versions to coexist so I can just install 21. but jdtls gives an error if you try to use it with a pre-21 java
johnjayand jdtls is the only lsp for java i am aware of
ernimrilso what is the problem with running jdtls with java 21 or later? (I would use java 25 most probably)
ernimrilif you want to compile for an older jdk you can use "-release 17" as a compiler flag, that will set the language _and_ API level to that given release
johnjaywell. presumably if i were debugging or analyzing java 17 code with jdtls it would show me features and classes that might not exist or be available
johnjayas i said i don't know much about language-server-protocol in java, if there are others besides jdtls that would be useful to know
dreamrealDo the lsps respect library version numbers? Like, okay, you use it with 25, but 25 introduces method X on class Y with @since 25, if you're using -release 17 does it still report Y.X as a possible completion?
ernimrilI have not tried it, I would consider it a bug if it it does
johnjayi'm not sure i understand, i thought -release was a flag for javac ?
ernimrilyes, that is where it originated
johnjayin the situation i was in my system was reporting 11 from 'java -versoin' and then it refused outright to run jdtls from a binary download on my mint pc
johnjaymeaning, jdtls requires 21 or later. i would *guess* that means it supports 25 completions as well. is there a class or member i could use to check?
ernimrilct.sym has the information about what classes and methods are in each release (but it is binary so not trivial to read)
johnjaywould it maybe say in release notes?
dreamrealI still don't know what would make an LSP compelling
johnjayit provides completions, that's what i use it for mainly
dreamrealsure. But why LSP? Does it cost less than eclipse or idea?
johnjaythat way i can use vscode or vim instead of a large ide
johnjayin terms of wait time for them to load idk, maybe once idea loads fully they take comparable time?
ernimriljohnjay, when was the last time you tried idea? on what hardware?
ernimriljohnjay, it starts in a few seconds on my laptop (a few years old)
dreamrealHow many times are you starting your IDE anyway? That's like refusing to use java because the startup isn't <2ms
dreamrealMy IDEA has a running time of about 3 minutes less than my system uptime right now
dreamrealmostly because I have to connect to a bunch of other services too and I just started it AFTER them, not really a reasoned "oh I must run things in this order"
johnjayernimril: i did try it for a few seconds but in my window manager i think i had something amiss, i couldn't close it
johnjaybut you're right it does seem faster than I remember
nimajethe promise of LSP is to split away IDE features from IDEs into a LS, so that you can just use whatever editor as long as it supports LSP, that doesn't fully work out because LSP isn't that good a protocol. There is at least one project that turns idea into a java language server https://github.com/SuduIDE/ideals
javabotnimaje's title: "GitHub - SuduIDE/ideals: Turns IntelliJ IDEA into a generic LSP server"
nevetGitHub - SuduIDE/ideals: Turns IntelliJ IDEA into a generic LSP server
johnjaynimaje: what are its shortcomings in your view? i've never really thought about its technical merits
nimajeI don't remember fully, there where some reasons why you couldn't just have some generic LSP client, but still needed some language or server (not sure which) specific plugin to map stuff to your editor, of course smaller then a plugin for the language itself as the LS does most of the stuff and I think the protocol was some json messages via fake-http, which isn't really compatible to http and most
nimajeimplementations of that fake-http were broken in their own way
jreichernimaje: the promise of LSP is not just a potential diversity of editors. It means that even if you use just on editor, the maintainers of the editor don't need to write support for multiple different languages.
jreicherThe protocol isn't just for interoperability of software; it's also for interoperability of teams.
dreamrealnot sure interop of TEAMS is really all that affected
dreamrealbuild tools would be the lever there
jreicherWell AFAICT (from a distance), the VSCode maintainers haven't had to write Java intelligence. The Eclipse maintainers have done it for them. That's what I mean.
dreamrealYeah, I get the benefit as long as it works, but that's ... okay, so you're talking about different teams than I am. Shut up!
dreamreal:D
jreicher:)
dreamrealjreicher: ++
nevetjreicher now has karma of 1.
nimajejreicher: isn't that what I wrote? the developer of a editor only needs to write a LSP client, not full support for every language the editor should support
dreamrealI think you guys are saying similar things, yes
wazidea loads on startup for me
wazVS code is just missing too many things I depend on
jbosmansi'll double second that regarding vs code <-> intellij
jreicherI've avoided vscode so far but I get the impression it's almost designed not to have much by default. The "extensions" are actually required. Might make sense for there to be a set of "core extensions" that are always installed by default.
* kcomhnall havent used vscode since leaving coding bootcamp in 2020
kcomhnallit's cool for Javascript projects
ParaIt's basically typescript's companion.
ParaAnd fwiw it's kinda okay.
kcomhnallif I *had* to use anything else besides intellij - I'd be using eclipse
jreicherWhat's the advantage of eclipse over vscode with the eclipse language server?
jreicher"Feels better"? (That's a thing; I'm not being sarcastic)
kcomhnalldunno - but I won't be finding out anytime soon.
kcomhnallI get to try out the spring tools I guess
kcomhnallhm, vscode has spring extentions - unlike the full integration with eclipse. I suppose that's one advantage
* kcomhnall goes back to understanding how spring aop handles classes that dont implement an interface
jreicherkcomhnall: don't all classes "imply" an interface?
jreicher(One of the things I don't like about typical OO, to be honest)
PocketKillerI always walked around with the thought that every class is an implmentation of itself
PocketKillerimplementation*
jreicherYep
kcomhnallAOP compliments OO...we know that. jreicher I actually mean in the context of proxying and if it uses the JDK Dynamic proxies or does something else.
jbosmansyeah, well, imho there's no advantage of vs code over eclipse or vice versa, it'd be silly to not be using a jetbrains ide
bdklI was just about to ask if I should take advantage of my student status for jetbrains, so I guess there's my answer lol
jbosmansbdkl, fwiw right, and ymmv etc :)
jbosmansoverall i'd say it's worth it
jbosmans"says someone" etc :)
bdkljbosmans: i always appreciate the sage advice of my betters
kcomhnallcomplements*
kcomhnallbrain is mush right now
jbosmansbdkl, no-one is better, there's only those who aspire to grow, and those who .. don't
jbosmansin any case, if price isn't an issue i would recommend a jetbrains ide, having used all the others myself way back when
jbosmanswell, probably not "all" the others :)
jreicherI periodically repeat this conversation at work and that feedback is what I consistently get too. Jetbrains still seems to be the best.
jbosmanssounds familiar :)
jbosmanswe ought to get paid
jreicherPeople who use other things seem to have a "personal" preference rather than an objective evaluation. For example they might have an historic attachment to older tools and don't to learn something else unless the difference is very large.
jbosmansfwiw jetbrains isn't the underdog anymore
jbosmansyeah that makes sense
jbosmansi quite liked eclipse "before", and didn't like intellij "at first'
jbosmans*"
jbosmansi grew up in a different time tho, and imho the way jetbrains/intellij did/made their ide(s) was best
jbosmanscode centric iirc way back when
jbosmansquite different from attempts at "wizard driven development"
kcomhnallheh, 'before' makes me think of the action taken by an aspect at a particular join point. an "Advice"
jbosmans:D
jreicherWhat is "wizard driven development"? (Sounds horrible, although I think I saw it)
jbosmansAOP ftw :-) well, then again, no
kcomhnallheh
jbosmansi have/had a book about that
jbosmansnever did get around to properly levering AOP
jbosmansspring supports it with proper annotations
jbosmansjreicher, it's like "create a new servlet in this project" etc
jbosmansyou'd get a form or two to fill out and then proper changes are made for you
jbosmansin the idea scenario ;)
jreicherIt gives you a code template that you then fill in, or it tries to write all the code? And what tools had this? I get it for very limited system, but a general purpose programming language??? Hell no.
jbosmansyeah, it's sort of like "if you call this method on this object, do this or that before or after"
jbosmansit can/could also be done for many similar invocations etc
jbosmansi think in the long run the conclusion most people made was "we need to maintain this as well"
jbosmanswhich was kind of a bummer
kcomhnallugh...found my answer : "By default, CGLIB is used if a business object does not implement an interface"