• cheeser
  • ernimril
  • joed
  • kinabalu
  • lunk
  • ojacobson
  • r0bby
  • ThaDon
  • ricky_clarkson
  • topriddy

« 2019-07-12


2019-07-14 »

Nick Message Date
dudeji [dudeji!7aac6a34@] has joined ##java [12:04]
forgottenone [forgottenone!~forgotten@] has joined ##java [12:09]
buttsanchez [buttsanchez!] has joined ##java [12:23]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [12:28]
macroprep [macroprep!~smallvill@2405:7f00:8801:d00:d052:239c:dd65:c62f] has joined ##java [12:29]
djhworld [djhworld!~djhworld@] has joined ##java [12:39]
fstd_ [fstd_!~fstd@unaffiliated/fisted] has joined ##java [12:49]
jdfthetech [jdfthetech!] has joined ##java [01:05]
veegee [veegee!] has joined ##java [01:14]
hd1 [hd1!4c5b0bf5@gateway/web/cgi-irc/] has joined ##java [01:15]
hd1 can spring-boot change its SSL certificate without restarting the server? [01:16]
Munnu [Munnu!] has joined ##java [01:19]
Diablo-D3 [Diablo-D3!] has joined ##java [01:24]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:20e4:c397:15ca:cfe7] has joined ##java [01:34]
Diablo-D3 [Diablo-D3!] has joined ##java [01:34]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:20e4:c397:15ca:cfe7] has joined ##java [01:35]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [01:37]
hypc [hypc!~Thunderbi@] has joined ##java [01:41]
macroprep [macroprep!] has joined ##java [01:54]
shantaram [shantaram!uid207478@gateway/web/] has joined ##java [02:00]
vbgunz [vbgunz!] has joined ##java [02:16]
Me4502 [Me4502!~quassel@unaffiliated/me4502] has joined ##java [02:19]
brl4n [brl4n!] has joined ##java [02:20]
unleaded [unleaded!~digiberk@unaffiliated/digiberk] has joined ##java [02:22]
donotturnoff [donotturnoff!] has joined ##java [02:22]
macroprep [macroprep!~smallvill@2405:7f00:8a0c:900:f846:b3:133b:facf] has joined ##java [02:22]
Katana [Katana!~hentai@unaffiliated/katana] has joined ##java [02:36]
led_dark_1 [led_dark_1!~Thunderbi@] has joined ##java [02:40]
hd1 [hd1!4c5b0bf5@gateway/web/cgi-irc/] has joined ##java [02:53]
hd1 parted the channel: [02:53]
ipe [ipe!] has joined ##java [02:59]
mohsen_1 [mohsen_1!uid289573@gateway/web/] has joined ##java [02:59]
Randolf [Randolf!~randolf@] has joined ##java [03:03]
Randolf I'm having trouble getting JavaFX working on Ubuntu Linux. I've used "apt" to install the OpenJFX package, and I can see /usr/share/java/javafx-* files present, but when I try to start a simple "Hello, world" JavaFX class from the command line I see an error that "javafx/application/Application" could not be found. [03:05]
Randolf I've tried various instructions after searching Google, but nothing seems to work. [03:05]
Randolf Is anyone using JavaFX on Ubuntu Linux successfully? If so, how did you get it to work? Thanks in advance. [03:06]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [03:13]
macroprep is it impossible to make a plugin for the JVM ? as i cant find ANYTHING about this on the internet (literally everything just leads to android studio plugins, compiler plugins, ect) [03:15]
yawkat what would such a plugin do? [03:16]
macroprep it would basically be equivilant to, in C/C++ dlopening a .so, dlsyming a symbol (usually a function) then invoking that function [03:17]
yawkat oh, so not a jvm plugin at all. [03:17]
yawkat osgi [03:17]
yawkat OSGi is a module system for Java. It's used in Eclipse, Glassfish, and a host of other environments. See also ~equinox, ~felix, ~knopflerfish, and ~karaf. [03:17]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [03:17]
mohsen_1 Randolf: have you checked: ? [03:21]
LunarJetman2 [LunarJetman2!LunarJetma@] has joined ##java [03:21]
macroprep wait would a JAR file be sufficent? [03:22]
surial macroprep: yes. [03:30]
macroprep ok [03:30]
surial Randolf: javafx is an external dependency these days. If you're a developer: Include it in your dependencyl ist. If you're not: You're in the wrong channel. Talk to the developer. They need to upgrade their stuff: Your app will not work with java9 or higher without that update, so, go back to java8, that might work. [03:33]
Randolf mohsen_1: I'll take a look. [03:33]
Randolf I'm developing Java software. [03:33]
Randolf I'm using OpenJDK 11. [03:33]
Randolf mohsen_1: So the version I downloaded through "apt install openjfx" has the same version number as the current Public listing on that web site you linked to. [03:34]
surial [03:35]
surial surial's title: "Getting Started with JavaFX 12" [03:35]
surial Randolf: ^^ that's the step-by-step tutorial. [03:35]
Randolf surial: I moved from Windows 10 to Ubuntu Linux to get away from all the crashing and slowness, and so this dependency stuff has caught me by surprise. I'll have to look into how to set this up with javac. Will I need to bundle JavaFX in my .jar files now? [03:35]
yawkat maven [03:36]
yawkat Maven is a software management tool that can compile, test, package, and deploy your project, with plugins for everything you can think of. See and [03:36]
yawkat and yes [03:36]
surial Randolf: you don't distribute desktop java apps by shipping 'a single jar'. [03:36]
yawkat in principle youre actually supposed to package the entire jre nowadays. [03:36]
surial Randolf: java9 changed everything. [03:36]
Randolf surial: This link looks helpful: [03:36]
Randolf Randolf's title: "Getting Started with JavaFX 12" [03:36]
surial Randolf: I strenuously advise you to either [A] learn this brave new world, or [B] stick with 8. [03:36]
Randolf surial: Oh, I was using Java 8 before skipping up to 11. [03:36]
Randolf My preference is to keep current as I think Java 8 is getting rather outdated now. [03:37]
surial Randolf: you distribute java apps for desktop with jlink. You don't stripe jars. But, yes, javafx needs to be part of the distribution. The entire JVM needs to be part of it; oracle nor any other party distributes JREs anymore. JRE as a concept is gone. dead. [03:37]
surial Randolf: then you need to learn a lot. [03:38]
surial if you're writing server apps and such, just run this stuff on a JDK. But if you want to distribute java apps, hoo boy. [03:38]
Randolf Wow. This is good to know. [03:38]
surial Why not make it a webapp, by the way? [03:38]
Randolf One of the main reasons I got into Java in the first place was that I could have my code run on multiple platforms without having to compile separately for each one. [03:39]
surial You're building a java desktop app, so, presumably, you're targeting the lowest common denominator, not going for a particularly low-resource app, and it's not going to follow the LnF of any OS. so... why the hell isn't it a webapp? [03:39]
macroprep [macroprep!~smallvill@2405:7f00:8801:d00:f846:b3:133b:facf] has joined ##java [03:39]
Randolf surial: Oh I've got lots of web-based applications. There are a few that need to be local applications though for a few reasons that I'm not interested in getting into. [03:39]
surial Randolf: Well, I guess your situation (I can have an LnF agnostic, lowest common denominator, resource heavy app but I don't want it as a web app) is _SO_ incredibly exotic and rare nobody did it and java on the desktop died. [03:40]
Randolf I remember when Java Applets were no longer supported. [03:41]
Randolf That wasn't a big deal to me because I never got into that. [03:41]
Randolf But I'm curious, is there some approach that replaces that now? [03:41]
surial Given that you need to take charge of distribution, some care about platform local stuff (an 'installer', for example, distributing custom JDKs for each platform) is now your job. But I have very little experience with jlink (other than that it is a little buggy and tricky), which purports to solve this. IT's part of your JDK12. [03:41]
mohsen_1 surial: webapp requires html&css&js too, but one java developer with only the knowledge of java can build desktop apps [03:41]
surial Randolf: web apps. [03:41]
yawkat mohsen_1: learning js and html and css is easier than learning javafx. [03:42]
surial mohsen_1: javafx requires jfx and styling just the same, you're talking out of your ass. as always. [03:42]
mohsen_1 yawkat: have fun learning angular and alikes [03:42]
surial mohsen_1: angular is not required to have webapps. [03:42]
yawkat mohsen_1: arguably better frameworks than javafx can ever be [03:43]
Randolf yawkat: I already know HTML, CSS, and Javascript for the web site development I do for clients. If I'm to go that route, then I'll just continue with my ModPerl 2 infrastructure that works very well instead of making a move to Java in the backend for all of that. [03:43]
mohsen_1 surial: css(as in java fx) is far easier than dealing with all the stuff that happen in the browser [03:43]
surial neither is an 'alike'. HTML, CSS, js, and some basic templating. For some interaction, jquery was fine 10 years ago and is fine today. [03:43]
surial mohsen_1: yawkat disagrees. as do I. [03:43]
yawkat Randolf: java is not worth using for the front-end. it is good for backend, but if you prefer another language there, use that. [03:44]
yawkat mohsen_1: javafx css sucks [03:44]
Randolf yawkat: So, I agree. [03:44]
surial Randolf: Here's thing thing with 'desktop apps'. They feel really icky to use unless they hit ALLLLL the bells: They need to feel snappy, they need to look (and act!) like the native platform's LnF, they need to do things the way a 'native' app would do them, and almost always any 'lowest common denominator' multiplatform outlay just cannot adhere to such rules. [03:44]
mohsen_1 surial: managing state in plain js? [03:45]
Randolf yawkat: What I gather from all of this conversation now is that I'll need to bundle the JRE and JavaFX with my application. [03:45]
surial Randolf: here 'native' means: Ask the builder of the platform itself to write a calculator app. What would they write it in? [03:45]
surial mohsen_1: there's no need to have state in the browser if you don't want it. Server can track all of it. [03:45]
Randolf surial: I understand. Some clients don't want web-based interfaces though, so I've been writing desktop apps for them. [03:46]
surial Randolf: adobe flash, even as desktop tech (adobe air) died. microsoft silverlight died. swing died. javafx never really got anywhere. python, ruby, perl, php ? major languages (or were major at one time) ? never got any serious desktop widget thing goin in the first place. [03:46]
surial Right. And I'm saying: Nobody does this, and the apps are gonna feel like shit. [03:46]
mohsen_1 surial: I want it, people want an app to feel like an "app", rather than a website, so SPA - state [03:47]
Randolf I completely forgot about Microsoft Silverlight. The others you mentioned are well-known. [03:47]
surial That's how it usually goes if you're out in the sticks doing things nobody else does, as a programmer. No libraries. Whatever you use is buggy as fuck, the stable things you use are STILL buggy because you're using them in ways nobody else does. [03:47]
surial Randolf: well known and dead. [03:47]
surial Randolf: that's the point. The one thing they all have in common? They were the 'native tech' on ZERO platforms. [03:47]
Randolf Yup. [03:47]
Randolf I can mostly agree. [03:48]
surial note that on KDE linux, QT is native tech. But on windows, which has QT just the same, it's not. QT on KDE? Alive and kicking, works well, thriving community, etc (unfortunately KDE is not doing so hot, but that's a separate issue). QT on windows? Crickets. dead. etc. [03:48]
surial So it's CLEARLY not about the quality of the libraries, widget sets, etc. [03:48]
surial So, going back to javafx: You need a damn good reason. And 'my boss is too fucking dense to use a web app' is probably not a great one. [03:49]
Randolf For the average user, web-based is great because they can use it on their desktops, tablets, and smartphones. You don't need to try to convince me of this because you're just singing to the choir. [03:49]
surial but hey, I don't know your boss, maybe it's a great one :P ? the point is: You're in territory most people never go. The slog will be rare, few other coders will be with you on this. YOu'd think 'surely java, the most popular language in the world which its own desktop app library ? thats the place I gotta be'. But somehow, no. [03:49]
Randolf Well, I've got a mortgage to pay, and university tuition bills, plus the usual living expenses that lots of people have. If my clients want a desktop application and specifically not a web-based interface, then I do it for them because my bills aren't going to pay themselves. [03:51]
surial and hoops will show. RIght now, those are: You need to distribute javafx and the entire VM with your app in some sort of installer. The tool to do this with (if you go with the JDK9+ model vs. the up to JDK8 model) is to use the module system ( and friends), and jlink, and likely that experience is rather.. 'jagged', because, well, as I said, very few people give a shit about it. 99% of java devs just run their [03:52]
surial JDK11 code on a JDK on their servers that they manage. [03:52]
mohsen_1 Randolf: It's not like if you ask a question about javafx on stackoverflow, nobody's going to help you [03:52]
surial Randolf: Hey, far be it from me to tell you what to do. [03:52]
Randolf The servers for these are only needing PostgreSQL for this application, and that part's working just fine. [03:53]
surial jlink [03:53]
surial jlink is a tool to assemble and optimize a set of modules and their dependencies into a custom runtime image. [03:53]
Randolf surial: Again, you're preaching to the choir. I was just trying to get OpenJFX working, and now it seems I need to bundle everything together so I think I'm generally heading in the right direction. [03:53]
Randolf Thanks for the recommendation for jlink. I'll look at that now. [03:54]
surial I'm not preaching to the choir I'm telling you what to do: Learn about the module system. Learn to use jlink. Prepare to make installers for each platform you wanna target. [03:54]
funeral [funeral!~Funeral@2a01:79d:3e82:4b8c:a393:7879:435f:9c81] has joined ##java [03:54]
Maldivia no, jlink is a tool to assemble and optimize a set of modules and their dependencies into a custom runtime image. For documentation, see . [03:55]
Maldivia OK, Maldivia. [03:55]
Randolf mohsen_1: I stopped using Stack Overflow years ago after a big political mess with people getting pissed off at me for using the term "DOS Prompt" instead of "Command Prompt" simply because I used the same terminology as the person asking a question when I answered them. The people who got upset followed me around and caused problems on every question I answered, and the administrators couldn't resolve it (and they even started fighting over this issue [03:56]
Randolf too), so I left. [03:56]
surial gets some popcorn. [03:57]
Randolf Yeah, a lot of people commented about getting popcorn as soon as the administrators started fighting. [03:58]
mohsen_1 Randolf: I just mentioned stackoverflow as a popular helping site, there are others, lots of others [03:59]
surial what else can I do here? Commisserate? Mail stackoverflow admins? Pick up pitchforks and head to their offices? Find you then troll the folks who trolled you? [03:59]
Randolf Someone also hacked into the system and screwed up a bunch of the accounts, and mine got mixed up with someone else's. An excuse came out about it being a database design issue, and then a cross-server authentication issue. That eventually got resolved, but the timing wasn't great given the harassment. [03:59]
surial It's ##java. Please stick to the topic. [03:59]
Maldivia be cheeser [03:59]
Maldivia This is such a delightful topic, I'm not sure I can handle the awesomeness. How about it get moved somewhere else? [03:59]
Randolf mohsen_1: Oh yeah, that's correct. I think jlink is looking good. [03:59]
Randolf It looks like jlink only bundles the code that's needed. [04:01]
mohsen_1 Randolf: there's also - which has been quite helpful to me [04:02]
mohsen_1 mohsen_1's title: "Slack Team - JavaSpecialists" [04:02]
Randolf Thanks mohsen_1. [04:03]
mohsen_1 Randolf: ? [04:04]
Randolf It's a little bit unclear, but does jdeps produce self-contained ELF and EXE binaries? [04:08]
Randolf Sorry, jlink, not jdeps. [04:08]
Markow [Markow!~ejm@] has joined ##java [04:15]
progart [progart!~kamee@] has joined ##java [04:21]
progart [progart!~kamee@] has joined ##java [04:23]
progart [progart!~kamee@] has joined ##java [04:24]
Maldivia Randolf: depends how you look at it -- it bundles the java executable together with the modules/classes needed [04:28]
Maldivia Randolf: so it's not just one giant exe file [04:28]
Maldivia but all the dependencies are bundled with it [04:29]
Devastator parted the channel: [04:29]
Devastator [Devastator!~devas@unaffiliated/devastator] has joined ##java [04:30]
Wormstalker [Wormstalker!] has joined ##java [04:36]
Randolf Maldivia: If the end result is that the user has one binary file to launch from their Linux or Windows desktop, then that's fine. [04:36]
Maldivia usually it generates a script as well to launch [04:36]
Randolf Okay. I'm going to try to get this working. [04:38]
Maldivia remember, you would need to generate one for each platform you want to support [04:38]
macroprep can JAVA refeence external methods like C* can reference external functions? [04:41]
macroprep reference* [04:41]
Maldivia macroprep: external methods? you mean native methods? [04:41]
macroprep like, external java methods residing in seperate JAR files [04:42]
Maldivia of course, you do that all the time [04:42]
macroprep ok, how would i do that? [04:42]
Maldivia well, usually to add it to classpath when you compile [04:43]
macroprep and when it is intended to be loaded at runtime? [04:43]
Maldivia it needs to be on the runtime classpath [04:43]
Maldivia classpath [04:43]
Maldivia The classpath tells Java or the compiler which jar files and folders to search for classes and resources. Use the -cp/-classpath run-time options to specify the classpath (does NOT work with -jar!). Also see [cheeser's blog], [], or for more information. [04:43]
macroprep so i would do something like this? in A.JAR declare it a int A(); int b() { return A() + 9; } and in B.JAR int a() { return 5; } class main { void main() { /* load A.JAR */ system.out(b()); } } [04:47]
surial macroprep: none of that is legal java. [04:48]
surial macroprep: there's no need to 'load a.jar'. [04:48]
surial macroprep: when you start the VM, a bunch of jars are on the classpath (there are various ways to communicate these on bootup). ANd then they just are. [04:48]
surial follow the link to learn. From your statement it sounds like you didn't read it, or if you did, you didn't get it. read it again. [04:48]
macroprep surial, well the A.JAR file is not GARENTEED to be available at runtime nor at boot time of B.JAR [04:49]
surial macroprep: if it's not your app won't work. [04:50]
surial your RAM is not guaranteed to stay in place (versus sproing out of its holds). [04:50]
macroprep surial, true [04:50]
Maldivia unless you do some classloader tricks and it's optional/plugin [04:50]
surial So do you write code to go: If the RAM goes flying out of the case, do this? [04:50]
surial No. [04:50]
surial macroprep: there ARE ways to dynamically load jars at runtime and its very complicated. given that you're a java newbie, don't do it. [04:50]
masuberu [masuberu!] has joined ##java [04:51]
Maldivia surial: no no, let's just tell him about OSGi now :D [04:51]
Diablo-D3 [Diablo-D3!] has joined ##java [04:54]
masuberu hi, how can I check the jvm flags? I am trying to connect my visualvm to my remote server through jmx and for some reason it is not working (firewall ports are open) [04:56]
masuberu I edited /etc/tomcat8/tomcat8.conf and put JAVA_OPTS="" [04:57]
Maldivia masuberu: run jcmd [04:57]
Maldivia masuberu: jcmd PID VM.flags and jcmd PID VM.system_properties [04:58]
Maldivia depending on what settings you're after [04:58]
surial masuberu: you've given the ability for absolutely any soul who knows your remote server's IP to hack it. [05:00]
surial masuberu: good job. [05:00]
masuberu surial, yes but only my public ip can access the jmx port [05:01]
masuberu anyway you are right it is not a good practice [05:01]
Maldivia masuberu: I think jmx by default only listens on localhost -- check what it listens to (netstat output) [05:01]
surial masuberu: I think so, yeah. You can use SSH to reroute ports which will effecitvely come from localhost and thus work, except.. doesn't jmx do a whole bevy of TCP/IP connections, requiring ssh -D option (socks proxies0? [05:02]
Diablo-D3 [Diablo-D3!] has joined ##java [05:05]
davlefou [davlefou!~davlefou@unaffiliated/davlefou] has joined ##java [05:08]
jackweb [jackweb!jackweb@gateway/shell/] has joined ##java [05:09]
masuberu ok so I added -Djava.rmi.server.hostname=<my public IP> and restarted tomcat but still doesn't work... [05:10]
masuberu not sure whether this is the right to check but the flags looks correct when I run jps -lvm [05:10]
Maldivia masuberu: ffs, I just told you how [05:11]
masuberu Maldivia sorry, it says Unable to open socket file: target process not responding or HotSpot VM not loaded when i run your command [05:17]
Maldivia and jcmd alone doesn't list the process? [05:17]
masuberu jcmd lists the processes yes [05:18]
Maldivia oh well, then check netstat what it's listening on [05:18]
masuberu ok, I have another question here netstat says :::5006 does it means it only listens IPv6? [05:22]
Maldivia if that's the ONLY line with LISTEN on that port, then yes [05:22]
surial masuberu: IPv6 and v4 are listed separately. find the other line. [05:22]
masuberu ok, then that should be my issue, there is no *:5006 anywhere [05:23]
surial huh. that's a little weird. [05:23]
surial but sounds like we're getting somewhere as to finding why you're having a hard time with this :) [05:23]
masuberu yes, it is weird, why is ti doing that? [05:26]
Maldivia well, you gave it a hostname? and that hostname resolved to ipv6 then [05:26]
masuberu but when I put flags -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 then netstat shows *:5005 [05:27]
Maldivia that's different [05:27]
masuberu ok [05:27]
Maldivia different implementation etc [05:27]
Maldivia masuberu: try telling it to listen to [05:28]
masuberu -Djava.rmi.server.hostname= same result (only listens IPv6) [05:29]
dreamreal morning [05:31]
null1337 [null1337!] has joined ##java [05:39]
macroprep [macroprep!~smallvill@2405:7f00:8801:d00:e075:7e30:19fe:da19] has joined ##java [05:39]
masuberu surial Maldivia I could tell jvm/jmx to listen to ipv4 by using this flag [05:41]
xeno_ [xeno_!~xeno@unaffiliated/xeno] has joined ##java [05:48]
Jantz [Jantz!] has joined ##java [05:48]
x256 [x256!] has joined ##java [05:48]
wildlander [wildlander!~wildlande@unaffiliated/wildlander] has joined ##java [05:49]
macroprep [macroprep!] has joined ##java [05:55]
db [db!uid18678@gateway/web/] has joined ##java [05:57]
jeromelanteri [jeromelanteri!jeromelant@gateway/vpn/privateinternetaccess/jeromelanteri] has joined ##java [06:14]
wildlander [wildlander!~wildlande@unaffiliated/wildlander] has joined ##java [06:14]
jeromelanteri hi, i'm new on java (in fact i'm learning scala, so i'm talking about java-8) and i would like to find a good link with reach list of libraries for java-8 (like kind of openCV, gstreamer wrappers, and also list of GUI to use with java). Do you have some links about that please ? [06:16]
dreamreal awesome java [06:17]
dreamreal Awesome java frameworks, libraries, and software: [06:17]
dreamreal jeromelanteri: this will not help you a lot [06:17]
jeromelanteri dreamreal, but a litlle bit maybe, i'm going to have a lokk on that thank you (if someone have some more, don't hesitate). [06:18]
dreamreal that's one of the best curated lists. There's probably also an awesome-scala project on github for the same purpose, but scala in general sucks so badly that I can't imagine it'd be generally useful. [06:18]
dreamreal (ex-scala programmer here.) [06:20]
jeromelanteri dreamreal, good ! You said that Scala sucks badly ? So why industry compagnies use it and search devs with Scala knowledges ? Which version of Scala sucks badly and what exactly is wrong with Scala ? [06:20]
dreamreal jeromelanteri: not knowing what you asked, you answered it [06:20]
dreamreal scala [06:20]
dreamreal Scala ( is a programming language for the JVM that combines object-oriented and functional features. It's interoperable, and can be very nice. See #scala - and note that scala has LOTS of head-scratching prior to those *EUREKA!* moments that make everything worthwhile. [06:20]
jeromelanteri ) that is very funny, thank you. [06:21]
dreamreal scala *as a language* is generally fine. But the community around scala is incredibly toxic, and the binding of libraries to specific scala versions and compilers and idioms makes most scala projects either evangelism projects ("I use dotty for *everything* and scalaz must die") or one-off ("I used dotty 2.11.2 here, scalaz 2.12 there, and...") [06:21]
macroprep is it possible to load a class directly instead of a .jar file? [06:23]
dreamreal macroprep: uhhhhhhhh how does one "load a jar file" [06:23]
Maldivia macroprep: a .jar file is basically just a .zip file with .class files inside [06:23]
jeromelanteri ho i understand the second part of your crtici. Fir the first part, i will see... sometimes, speak bad about a comunity is also something logicaly considered as a toxic way of communicate, so... you maybe right, but i 'don't know you. [06:23]
macroprep like, load ./a.class instead of ./a.jar [06:23]
jeromelanteri critics [06:23]
Maldivia macroprep: you don't LOAD a jar file [06:23]
dreamreal macroprep: how does one "load a jar file" [06:24]
dreamreal one puts a list of resources in the classpath. [06:24]
Maldivia macroprep: and yes, you don't need to have .class files in a jar file, they can be on disk as well, or anywhere else depending on your classloader what it supports [06:24]
macroprep or does the API only accept JAR files [06:24]
dreamreal macroprep: you've been attempting java for months now. It's long past time you had some idea about java. [06:24]
dreamreal classpath [06:24]
dreamreal macroprep, The classpath tells Java or the compiler which jar files and folders to search for classes and resources. Use the -cp/-classpath run-time options to specify the classpath (does NOT work with -jar!). Also see [cheeser's blog], [], or for more information. [06:24]
dreamreal macroprep: as I said in a different channel, have you considered .net? [06:24]
dreamreal If you haven't, would you be willing to start? [06:25]
dreamreal simple scala [06:26]
dreamreal jeromelanteri, trait **->**->** {implicit def **->**->**[A, F[_, _], B](a: F[A, B]): *->*->*[A, F, B] = new *->*->*[A, F, B] {val value = a}} [06:26]
dreamreal jeromelanteri: *shrug* I don't mind if you take scala criticism with grains of salt - you do NOT know me. But I think you'll find that what I'm saying is true. If you're not using kafka or spark, scala's not very useful in the grander scheme of things. I'd consider kotlin instead. [06:27]
dreamreal kotlin also has the advantage of being able to use java (and kotlin) languages such that their usage is idiomatic and not "oh god now I've got to convert between java and scala idioms *again*" [06:28]
Katana [Katana!~hentai@unaffiliated/katana] has joined ##java [06:28]
jeromelanteri I was also looking for kotlin. Someone told me they are searching for Scala devs actively (they have difficulty to find some). That is why i'm learnign Scala. I'm far from criticism or toxic communications or whatever children uninterested war. [06:29]
dreamreal jeromelanteri: I'm certainly not trying to judge you [06:29]
jeromelanteri that's good [06:29]
dreamreal I've just... you know, done scala professionally and will not do so again [06:29]
dreamreal It's a waste of time [06:30]
jeromelanteri ok, i understand. what was the last version you used ? Scala is very new i think. [06:30]
dreamreal 2.12 [06:30]
dreamreal scala's not THAT new! [06:30]
jeromelanteri and for sure, Kotlin would be from far more compatible also w<ith any Java code [06:30]
Maldivia Scala is 15 years old... [06:31]
jeromelanteri i'm reading big change appears on 2.13... did you see that ? [06:31]
dreamreal Yes. That's not a good thing for scala. [06:31]
jeromelanteri not good if scala no more sucks so badly next to this 2.13 ? [06:32]
macroprep UGHHHHH why does every example use a jar file as its path ;-; [06:32]
dreamreal no. It means that you have YET ANOTHER iteration of "okay, this library here isn't useful for current scala" [06:32]
dreamreal macroprep: classpath? [06:32]
Maldivia macroprep: java -cp . pkg.Main [06:33]
Maldivia Maldivia: there you do, something that uses a directly as classpath [06:33]
Maldivia macroprep: [06:33]
jeromelanteri dreamreal, i joke, i was just test your way to communicate. I consider all speach (absolutly all of them... toxic or not, i will se by myself). [06:33]
dreamreal macroprep: you've really been doing java far too long to not understand really basic concepts [06:33]
Maldivia macroprep: or if you build something with maven, java -cp target/classes pkg.Main [06:33]
macroprep eg somePlugin = loader.LoadClass("path/to/jar/file", "com.example.pluginXYZ", MyPlugin.class); [06:33]
dreamreal don't care, you really need to learn java [06:34]
macroprep [06:34]
Maldivia macroprep: if you don't understand the concept of classes and jar file, looking at classloaders is NOT the right thing to do right now [06:34]
jeromelanteri wow... [06:34]
kicked macroprep (tutorial) [06:34]
dreamreal there's some people you just can't reach [06:35]
dreamreal He's been trying to overreach his knowledge since day one... and has never said "gee maybe if I learned the basics I wouldn't have to keep asking about the basics" [06:36]
adder [adder!~adder@gateway/tor-sasl/adder] has joined ##java [06:38]
x256 o.O [06:40]
ipee [ipee!] has joined ##java [06:50]
Katana [Katana!~hentai@unaffiliated/katana] has joined ##java [06:53]
paulpaul1076 [paulpaul1076!b00e9477@] has joined ##java [06:57]
Diablo-D3 [Diablo-D3!] has joined ##java [07:05]
makavelli130 [makavelli130!2e47397d@gateway/web/cgi-irc/] has joined ##java [07:08]
noodlepie [noodlepie!~phillip@] has joined ##java [07:15]
Diablo-D3 [Diablo-D3!] has joined ##java [07:17]
mr_lou [mr_lou!] has joined ##java [07:25]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [07:37]
acidjnk [acidjnk!] has joined ##java [07:40]
rnat [rnat!uid73555@gateway/web/] has joined ##java [07:44]
johnau [johnau!~john@] has joined ##java [07:45]
Diablo-D3 [Diablo-D3!] has joined ##java [07:57]
viju [viju!~viju@] has joined ##java [08:03]
Diablo-D3 [Diablo-D3!] has joined ##java [08:08]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [08:08]
unleaded [unleaded!~digiberk@unaffiliated/digiberk] has joined ##java [08:08]
unleaded [unleaded!~digiberk@unaffiliated/digiberk] has joined ##java [08:09]
CookieM [CookieM!] has joined ##java [08:15]
iamNOTadog [iamNOTadog!~nicey@] has joined ##java [08:16]
ryuukk_ [ryuukk_!~quassel@2a01:e34:ef6f:b1e0:1922:ae11:ac4b:643d] has joined ##java [08:16]
ryuukk_ hi, i got a swing app there use more memory than needed, as you can see in the graph in visualvm, the head used if really low compared to the heap available [08:17]
ryuukk_ -Xms100m -Xmx150m doesn't seems to have an effect [08:18]
ryuukk_ program stays at 220~mb [08:18]
ryuukk_ 5min runtime heap usage seems stable, but the vm doesn't seems to shrink the memory usage, why ? [08:20]
x256 ryuukk_: [08:24]
x256 x256's title: "java - Does GC release back memory to OS? - Stack Overflow" [08:24]
x256 You sure you are providing -Xmx150m as an argument to java, not the main method of the application? [08:25]
masuberu hi, is there any tool I can use to find bugs in my code? [08:26]
masuberu I have special interest in finding memory leak issues [08:27]
ryuukk_ x256: thanks, i'll check that out [08:27]
ryuukk_ yes i double checked, as VM option [08:27]
genstor2 [genstor2!~rotsneg@] has joined ##java [08:29]
x256 masuberu: With visualvm you can create a heap dump and inspect the objects that are currently on heap, and see why they are still reachable and not garbage-collected. [08:30]
tristianc [tristianc!] has joined ##java [08:30]
x256 ryuukk_: The JVM only shrinks the heap after a while of constant low heap usage, because shrinking/expanding the heap is expensive. Forcing a couple of full GCs can speed up this process, but usually this is not required as the VJM does that automatically after some time. That your heap is 200M despite your -Xmx150m parameter ts strange though. [08:33]
masuberu x256 yep but I cant connect visualvm from my laptop to my remote server [08:33]
TlrDr masuberu, I recently tried Jprofiler - I think it's excellent for finding memory leaks, database profiling, general profiling [08:33]
x256 masuberu: You can create heap-dumps from commandline, too, and then just download the file and analyse it offline with visualvm [08:34]
x256 jProfiler is nice, but not free. Java mission control is free since java 9 I think. It's basically a supercharged version of visualvm and may be useful. [08:36]
LearnAllTheTime [LearnAllTheTime!~LearnAllT@] has joined ##java [08:37]
TlrDr nice, didn't know [08:37]
TlrDr there is a section "Performance analysis" for other options here: [08:39]
TlrDr java [08:39]
TlrDr awesome java [08:39]
TlrDr Awesome java frameworks, libraries, and software: [08:39]
Xgc [Xgc!~Jon@] has joined ##java [08:40]
genstor3 [genstor3!~rotsneg@] has joined ##java [08:40]
x256 But IMHO the easiest way to find a memory leak (a reference leak, really) is: Make a heap-dump, load it in visualvm, search for the class with unusual high instance counts and look at the GC-Root of some of the instances [08:44]
x256 jProfiler or JMC probably have some smart tools for that, but the manual way works quite as well if yo do not have to do that every day. [08:46]
snickers [snickers!~textual@] has joined ##java [08:53]
troydm [troydm!~troydm@unaffiliated/troydm] has joined ##java [08:58]
esro [esro!~esro@] has joined ##java [08:58]
neo4 [neo4!] has joined ##java [09:06]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [09:10]
genstor3 [genstor3!~rotsneg@] has joined ##java [09:13]
surial masuberu: various linter utilities might be able to do it. I'm not personally aware of any, but then writing memory leaks in java is not exactly easy. [09:24]
surial masuberu: for example, one way to get a memory leak is to have a WeakHashMap<K,V> where you're mapping some key onto some value such that the value has a reference to the key. Say, you're mapping Class<?> instances to some method you found in there. [09:24]
surial masuberu: the problem then is that whilst WeakHM will not keep a GC lock on the keys, it does GC lock the values, and if the values refer to the keys, you've.. accomplished fuck all and none of it will get GCed. That's one way to get a memory leak. the linter tool can go build a graph of types, making each type expand into its constitutent fields' types, and if it gets back to the key type, that's almost always a clear sign that [09:25]
surial bugs are around and they would produce memory leaks. [09:25]
surial but it IS a pricey endeavour. So, you're looking at 'non-interactive' linters; things that run on an entire source base, take some time, and give you a report on the result. findbugs, pmd, etc. [09:26]
surial Not sure if they'd actually catch this, but they could. [09:26]
x256 Reference leaks are best found ad runtime. I doubt that any static analyzer would be smart enough to detect any but the most obvious bugs in this area. [09:27]
surial x256: can you sketch a scenario? [09:29]
surial I sketched one (WeakHashMap with a value that links back to the key). [09:30]
surial Because I jsut went: "Walls are solid. Look (drags in wall, knocks on it): Solid." And you go: "Fuck you I know better. You can run right through em!". [09:30]
surial not very beleivable. [09:30]
surial Here, I'll drag in a second wall and knock on that one too: Resources (stuff you need to close) can result in GC issues sometimes, depends on their implementation. linter tools can most definitely detect 'unsafe' use of resources (usage such that it is not possible to ascertain using static analysis that you will close them properly). That won't quite detect every possible way you can overload on resources, but it'll detect the [09:32]
surial vast majority of them. [09:32]
DTZUZO [DTZUZO!] has joined ##java [09:32]
surial That's 2 walls that are apparently solid. Your turn, I think. [09:32]
thebope [thebope!~thebope@pdpc/supporter/student/thebope] has joined ##java [09:35]
x256 Not closing an AutoCloseable is one of the obvious bugs a static analyzer might actually find. If there is a hard-coded rule for an improper use of WeakRefMap then perhaps that might be detected, too. But that requires domain knowlage that would only work for known types of caches. [09:37]
surial no it doesn't. [09:37]
surial what the hell? [09:37]
surial I just explained to you how a static analyser can find V->K coupling on weakhashmaps. [09:37]
surial either my analysis of how to do that is wrong in which case surely you can tell me where I messed up in my analysis, or you're misinformed. [09:38]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [09:38]
surial I get the feeling you're just waltzing in with a font of incorrect received wisdom and you're doggedly sticking to the bullshit in the face of logic and reason to show you the received wisdom is full of it. [09:38]
surial that or the received wisdom is quite correct (hey, generally received wisdom is well known for a reason. SOMETIMES its bull, but usually it is not), but help a fella out here; I can't currently think of all that many feasible scenarios where a static analyser would be hopeless but it's definitely a memory leak. [09:39]
surial possibly something involving repeated modular classloading without putting in the effort to ensure the stale ones can actually fully unload, that's pretty hairy. But that's extremely specific. [09:40]
surial there's using fleeting objects as event listeners, but that is a rare model in the first place and can be solved with non-shit event APIs (ones where you provide a pivot object + a listener, and the event handler will link the pivot to the listener in a WHM, which reduces it to the WeakHM case which I already covered). [09:41]
surial x256: ^^ [09:41]
x256 You said yourself that you are not sure if findbugs, pmd, etc would actually find that specific bug. I'd guess they don't, but I have not tried it, like you. I'm not arguing that it is impossible, only that it is quite hard to detect and I would not trust existing analyzers to fetch these. Cyclic dependencies are not necessarily a reference leak and there would probably be a lot of false-positives here. Finding these bugs at runtime is almost [09:43]
x256 trivial, compared. [09:43]
pr3d4t0r [pr3d4t0r!~zhenya01@VARENKA.CIME.NET] has joined ##java [09:44]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [09:52]
minos_ [minos_!] has joined ##java [09:55]
ertiportline [ertiportline!~ertiportl@unaffiliated/ertiportline] has joined ##java [10:05]
x256 My last resource leak was a close-method of a large application object captured by a shutdown hook. The bug was that, when manually closing the application object, the shutdown hook was not removed. No issue during normal operation, but a big issue in unit-tests or long running instances that restart the application a lot. This class of errors are hard to detect statically, because adding a shutdown hook (or a reference to any reachable [10:05]
x256 collection, to be more general) is normal behavior. The bug only manifests if more references are added than removed over time, but that usually depends on runtime behavior or complex application logic. A static analyzer would have a very hard time to find this bug without any special knowledge about shutdown hooks or a very high false-positive rate. [10:05]
x256 Finding that bug by looking at a heap-dump was quite easy, though. [10:09]
dansan [dansan!] has joined ##java [10:09]
sainathvd [sainathvd!~sainathvd@] has joined ##java [10:15]
untitled [untitled!untitled@unaffiliated/untitled] has joined ##java [10:19]
untitled A little quiz about spring: if I create new JdbcTemplate(datasource) in every DAOImpl, is it still thread safe? [10:20]
cheeser is what threadsafe? [10:20]
untitled compared to an injected bean (created only once) [10:20]
cheeser ah. what do the docs say? [10:20]
minos_ [minos_!] has joined ##java [10:21]
untitled it says that jdbctemplate is thread safe and some old best practice recommends creating a new one in every dao [10:22]
untitled but people on stackoverflow say that's old and not true [10:22]
LunarJetman [LunarJetman!LunarJetma@] has joined ##java [10:22]
untitled I am confused [10:22]
cheeser follow the docs. [10:22]
Wormstalker [Wormstalker!] has joined ##java [10:23]
dansan [dansan!] has joined ##java [10:39]
minos_ [minos_!] has joined ##java [10:43]
chonkin [chonkin!~quassel@2601:188:c401:9c3f:c9c4:63be:ce1c:4be1] has joined ##java [10:45]
rruizt [rruizt!] has joined ##java [10:48]
surial untitled: note that a statement 'JdbcTemplate is threadsafe' does not imply '... even if you keep making new instances of it'. [10:52]
surial it's likely, of course. put perhaps that just means: Given a single instance, if you interact with the same instance from 2+ threads simultaneously, things will work fine. [10:52]
surial x256: cyclic dependencies in java are not an issue and there's absolutely no reason why findbugs, pmd, etc would complain about them; I have no idea why you brought it up. The point is not 'do pmd / findbugs do this', it's 'can they?' and the answer is a pretty clear: Sure, they can. [10:53]
surial x256: nice example. The shutdown hook is effectively the 'event handler' case, and the API is shit. Like most event handler APIs. [10:55]
untitled surial: yes, I know about multiple instances not being thread-safe, that's why I'm rewriting my code to use an injected bean [10:56]
untitled a lot of bug-prone work :) [10:56]
surial And to adhere to my own rule of trying to explain why I am yelling at an API instead of just doing it: It is a crappy interactoin model for 'fleeting handlers' which admittedly are NOT usually relevant. Being forced to remember to unregister a fleeting handler is easy to forget and hard to do. Much easier to give the job to the event handler framework by handing it some object whose GC status matches the relevance of the handler [10:56]
surial (bringing its own V->K issue, but a pricey check CAN detect it, which you can turn on with -ea or some such). [10:56]
eucalyptus [eucalyptus!] has joined ##java [11:02]
dansan [dansan!] has joined ##java [11:02]
iamNOTadog [iamNOTadog!~nicey@] has joined ##java [11:05]
x256 Short-lived thread pools are also a nice way to leak memory (and worse: threads) all over the place. Live threads are GC-roots and not collected, even if no reference to the pool exists anymore. [11:12]
surial but then the thread is still running, that's weirder. [11:13]
x256 Thats normal for newFixedThreadPool or cachedThreadpool with a lower bound > 0 [11:14]
surial but that implies that such a threadpool is either [A] is intended to be continually used for the entirety of the existence of the app; it is made once during a VM's lifetime and never removed, or [B] it is a resource, like an InputStream, and must be closed. [11:17]
surial If that's the case it seems simple enough: Have a marker to indicate 'this one is a VM-lifetime one-off' and all threadpools created without it are subject to ARM checks. [11:17]
x256 Sure, it must be shutdown() (B). But ExecutorService does not implement Closeable or a close() method. Easy to miss for novice developers. [11:18]
surial and if the APIs don't allow it, I conclude that the powers that be don't give a fuck, and apparently then only morons would run into memory leaks? I can't really explain why the designers of APIs would release bazookas pre-tuned to aim at the user's feet for absolutely no good rason whatsoever. [11:18]
surial so moronic design then. great. [11:19]
x256 Its from 1.5 [11:19]
surial may I suggest that community effort is directed at fixing the fucking idiotic design then instead of writing convoluted memory leak scanners? [11:19]
surial that is no excuse. [11:19]
surial you can make wrappers to let ARM be a thing. Separate from that, linters can hardcode the various ExecutorService and friends classes to mark them as: This NEEDS TO BE SHUTDOWN in a finally block. [11:20]
surial they did it back before the AutoCloseable days for ALLLL the resources; none of these tools have forgotten about the 'we just have a long list of fully qualified type names along with the disposal method that must be invoked on them'. [11:20]
surial but hey, you got one there. That would be a reason to use a memory leak scanner. I'd be gnashing my teeth all the while cursing the boneheaded design that makes me use such a hard to use, non-automated waste of time instead of a near trivial codebase scanner, but, if that's how the APIs work today, yup. That counts. Thanks for the insights. [11:21]
x256 Any kind of resource that must be closed but lives longer than a single method invocation is hard to track. [11:24]
surial But it isn't. [11:25]
surial simple rule. Let's first simplify matters by stating that ALL such resources are AutoClosable. [11:25]
surial There where they aren't, they boil down to that if the linter tool realizes that try (ResourceType r = new ResourceType()) { ... } is equivalent to ResourceType r = new ResourceType(); try { ... } finally {r.disposeMethod(); } [11:25]
surial let's call either form 'ARM'. [11:25]
surial Then, the rule becomes simple: For any type marked as a resource, for all methods marked as generating-with-responsibility-on-caller (which defaults to all constructors and no other methods), then either [A] ARM is applied, or [B] the ref is stored in a field inside a class that is itself AutoCloseable, and its close() method safely disposes of this resource, or [C] the creation must be marked as lifetime-once, and this must be [11:27]
surial ensured in the form of a static field directly initialized. [11:27]
surial I'm pretty sure it is trivial to turn ANY usage of ANY resource, presuming these resources conform to non-stupid API (i.e. a simple dispose() method, preferably close() along with implementing AutoClosable, and only the constructors make things you must dispose) ? into one of these 3 forms. And those 3 forms can easily be checked by a linter tool. [11:28]
surial So if we all work like that, and I see very few reasons why you shouldn't - linters should feel entirely free to find any usage of such resources that does not conform to those 3 cases as inherently buggy and requiring a 'fuck off, linter, I know what I'm doing' marker. Which is fine, and if you get memory leaks there, hey, that's on you. [11:28]
eucalyptus [eucalyptus!] has joined ##java [11:29]
x256 That would work for the easy case, that that a sub-resource lives for a) a single method invocation, b) as long as its owner or c) forever. But there are scenarios where the truth is somewhere between a) and b) or b) and c). That's the hard part. [11:29]
DTZUZO [DTZUZO!~DTZUZO@] has joined ##java [11:29]
x256 You'd also have to track borrowing of resources. If A owns resource R1 and B borrows R1 from A, then now A cannot be collected as long as B has R1 borrowed. [11:31]
iamNOTadog parted the channel: [11:33]
x256 The GC can track this at runtime, but a static analyzer would have to know the order in which certain actions happen at runtime (e.g. A must not be closed while B holds a reference to R1), which is sometimes (often) non-deterministic. [11:34]
surial x256: I'm saying all cases are the easy case. [11:34]
iamNOTadog [iamNOTadog!~nicey@] has joined ##java [11:35]
surial x256: if you have a resource that has a lifetime requirement that exceeds the method that created it, then ** you must store it in a field of a thing that is autoclosable **, and just keep going up the chain. SOME method MUST someplace have the resource that wraps the resource that wraps... all the way down to the real resource creation, in a single method. [11:35]
surial And if you don't have that, I say you should refactor your code until it does and it won't be difficult to do so. [11:35]
surial And.. borrowing - that doesn't sound right. If A owns resource R1 and B needs to borrow it, A can't do that. Instead, you shold create a new object Z, and have both A and B refer to Z. [11:36]
surial Here, too: I don't think this is complicated. [11:37]
surial You can write java code with, say, 'Object x = somestring;' and then keep casting to string everywhere, making compile-time checking of sanity much more difficult and this crap style of code would serve no purpose and the correct answer is to stop doing it the hard way and start doing it the 'this is much easier to lint' way. And this case feels no different: There are correct and incorrect ways to deal with resources. Stick to [11:38]
surial the correct ways. [11:38]
rwheadon [rwheadon!] has joined ##java [11:38]
donotturnoff [donotturnoff!] has joined ##java [11:39]
x256 Knowing how limiting rust can be in some places, and how disciplined you must be so the rust compiler does not yell at you all the time, I do not have much hope for the typical java application to not contain such scenarios. They are not bugs most of the time, but because usually you just know that you should not close the owner of a resource and then use the resource. But a real hard proof that a resource is used correctly is really hard. Rust [11:44]
x256 does it, and rust is a masterpiece in this regard. [11:44]
x256 Existing linters for java are way more primitiv than the rust-compiler in this regard. Yes, It's possible (when developing a new application and following strict principles) but not easy. That's my point. [11:46]
x256 Finding memory leaks in java (today, in an existing application) is easier and/or more reliable at runtime, or by analyzing a heap-dump, than with static analyzers. [11:48]
ricky_clarkson Practically we just try not to give ownership of a resource to someone else, we strongly prefer try-with-resources. [11:56]
ricky_clarkson Rust's ownership sounds more useful as a way of not needing garbage collection, it sounds compelling versus C or C++ rather than versus Java. [11:58]
ricky_clarkson but I'm hazy on Rust's details, could easily be wrong. [11:58]
x256 In highly async code where you have to write state-maschines manually (because java does not do that for you, (yet)), a lot of state lived for more than one method invocation, but still has a strictly defined life-time. That is where I encounter most of these bugs, and where current static analyzers do not help at all. [12:00]
sunri5e [sunri5e!~sunri5e@unaffiliated/sunri5e] has joined ##java [12:01]
buttsanchez [buttsanchez!] has joined ##java [12:06]
Velgor [Velgor!] has joined ##java [12:07]
manualcrank [manualcrank!] has joined ##java [12:09]
royal_screwup21 [royal_screwup21!] has joined ##java [12:10]
royal_screwup21 hello [12:10]
royal_screwup21 /connect 6667 mquin:uwhY8wgzWw22-zXs.M39p [12:11]
royal_screwup21 oops sorry [12:11]
progart [progart!~kamee@] has joined ##java [12:14]
yawkat good password. [12:16]
surial I'd make fun of someone named 'screwup' pasting their password in here, but I have done that before once too. [12:17]
surial x256: java sucks at highly async code in the first place unless you use an API that is properly designed for it. I see a theme forming. [12:18]
surial 'if you do things in java using a shit for brains API that doesnt fit the problem domain well, linters can't find errors anymore for you.. errors you WILL make because, well, that's what bad API design tends to lead to'. [12:18]
surial and, yes, for async, the right API is a lot harder to do in current (JDK12) java syntax. Fortunately async is rarely needed. [12:18]
x256 I call it the 'drop the ball' problem when you forget to register a callback, or the callback is not called for whatever reason, and your state-maschine-instance just idles forever or is even GCd. really annoying. The servlet 3 async API is horrible. I spend a week writing a sane API on top of it. [12:22]
cheeser yawkat: the irony [12:26]
x256 I posted my super secret YubiKey password into a chat once because I touched it while moving my laptop :/ Focus changes while executing a KeePassX macro are also fun. [12:29]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [12:55]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:a576:7f91:b06a:4dd4] has joined ##java [01:11]
Markow [Markow!~ejm@] has joined ##java [01:15]
AcTiVaTe [AcTiVaTe!] has joined ##java [01:16]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [01:16]
Anthaas [Anthaas!~Anthaas@unaffiliated/anthaas] has joined ##java [01:18]
noodlepie [noodlepie!~phillip@] has joined ##java [01:18]
cixx [cixx!~user@] has joined ##java [01:25]
wyoung [wyoung!] has joined ##java [01:27]
wyoung o/ [01:27]
karab44 [karab44!~karab44@unaffiliated/karab44] has joined ##java [01:37]
dez [dez!uid92154@fedora/deSouza] has joined ##java [01:40]
runlevel7 [runlevel7!~runlevel7@unaffiliated/runlevel7] has joined ##java [01:43]
wyoung hi gang [01:44]
dansan [dansan!] has joined ##java [01:45]
wyoung I haven't used Java for a while. Is it still relevant? [01:45]
cheeser stares at wyoung [01:46]
wyoung zomg! cheeser!! it's been a while. Are you still relevant too :P [01:46]
wyoung I guess I shiuld repohrase my question. [01:47]
wyoung Are there any preferred web frameworks in java? OR is spring! still the norm? [01:47]
yawkat web frameworks [01:47]
yawkat Popular web frameworks: Dropwizard, Struts 2, Spring Boot, Stripes, Wicket, and Spark. Ask me about each for more info. Ask me about 'other web frameworks' for exotic choices that are not recommended. [01:47]
wyoung I used to use wicket [01:48]
wyoung but then I found django [01:48]
wyoung How do the framworks compare? [01:48]
wyoung yawkat: thnx [01:48]
wyoung I'll do some reading [01:49]
Zarthus Are you sure you've got a question? I'm not sure what you expect us to tell you. [01:49]
wyoung Zarthus: Well most of the companies I have worked for (and still work for) are moving off Java frameworks in preference to NodeJS or Django. What is Java's combat to that? [01:50]
Zarthus You've worked for so many companies that you're confident this is not just coincidence? [01:51]
yawkat django sucks [01:51]
yawkat all the same problems as spring [01:52]
wyoung yawkat: how so? [01:52]
yawkat moderate perf, bad abstractions for things like transactions or security, and so on [01:53]
waz Django!? Really? [01:53]
wyoung Zarthus: I should elaberate. WHen I say "work for" I don't just mean directly. Sub-clients / contracts mostly. [01:53]
waz Java to Django seems totally odd [01:53]
wyoung waz: I was using wicket at the time. It was a sane move. [01:54]
wyoung I have also used scala / play! [01:54]
waz that's amazing [01:54]
wyoung waz: cheers [01:54]
waz you used wicket, now you use django but you have to ask us how they compare [01:55]
wyoung waz: I am just after some bias opinions :) [01:55]
waz you're proving to be a bit of a moronic troll so far [01:55]
wyoung waz: I haven't been here for long, Hear me out [01:56]
dansan [dansan!] has joined ##java [01:56]
wyoung waz: Don't jump to conclusions just yet [01:56]
waz not unless you get back on topic [01:56]
wyoung waz: I thought I was. THis is a Java channel I was still after an opionion on if Java is still relevent, [01:57]
waz fuck you [01:57]
wyoung waz: <3 [01:57]
waz you are being a moronic troll [01:57]
wyoung DOn't get angry [01:57]
wyoung You are being an agressive arsehole. [01:57]
joev [joev!] has joined ##java [01:57]
wyoung waz: But lets get back on track [01:57]
wyoung back on topic mate [01:57]
waz which is java development you stupid fucker [01:58]
wyoung Swearing at me is offtopic [01:58]
wyoung take that somewhere else [01:58]
Zarthus Man, if only I could be as much of an adult as you two. [01:59]
waz there, now back to on topic chat [01:59]
waz next [01:59]
waz Another satisfied customer. Next! [01:59]
viju [viju!~viju@] has joined ##java [02:00]
kicked wyoung (so sorry you fucking troll) [02:01]
dansan [dansan!] has joined ##java [02:05]
joev [joev!] has joined ##java [02:07]
wyoung [wyoung!] has joined ##java [02:09]
wyoung o/ [02:09]
tomboy64 o.O [02:14]
wyoung tommy my boy! [02:14]
wyoung How do you find Java frameworks? [02:15]
tomboy64 hm [02:16]
tomboy64 do you know that feeling when a woman has just too big ... you know? [02:17]
tomboy64 i think that's a good analogy, yeah [02:17]
wyoung menstral cycle? [02:17]
tomboy64 apart from that, yah, i try to stick away from frameworks as far as possible [02:17]
wyoung I wrote a webapp to calculate pregancy due dates given metral cycles. It was in ES7 though, not Java. [02:18]
wyoung AngularJS actually, 1.2. Old but still in use, [02:18]
tomboy64 ah, yeah, that i don't consider a valid programming language [02:18]
wyoung ) [02:18]
wyoung Neither but my cusomters disagree with you [02:19]
tomboy64 get other ones [02:19]
wyoung I need to give them a reason to use Java. [02:19]
wyoung My main reason of coming here [02:19]
tomboy64 i read [02:20]
tomboy64 i'm the wrong person to ask [02:20]
wyoung oh [02:20]
wyoung I know you are convinced but that doens't help me [02:20]
iamNOTadog [iamNOTadog!~nicey@2804:7f4:c780:5d0c:7e82:fd48:98ee:e49b] has joined ##java [02:20]
wyoung unles you want to be my client :L) [02:20]
tomboy64 shrugs [02:20]
tomboy64 java was a major hype back in the early 2000s due to a lack of decent alternatives and the industry being in a boom [02:21]
wyoung I remember, I was there [02:21]
wyoung I learnt Java around then [02:21]
tomboy64 today its ecosystem is mature, a total chaos (in terms of relationships and dependencies) and its buildsystems are utter failures (maven and gradle) [02:22]
wyoung 1.3 [02:22]
wyoung oh? you don't like maven or gradle? [02:22]
tomboy64 have you ever tried building either yourself? [02:22]
wyoung What should i use to build and get dependencies form then? [02:23]
wyoung form* [02:23]
earthy [earthy!] has joined ##java [02:23]
wyoung I have tried to write an app by manually downloading dependencies. IT wasn't fun. [02:23]
tomboy64 anything that you can 1) inspect the source code of and 2) that doesn't just pull in random binary packages from $somewhere [02:24]
wyoung If Maven is bad what should I use? THat's equiv to NPM / yarn, PIP, etc..> [02:24]
tomboy64 so anything but maven and gradle [02:24]
wyoung should I use ant? [02:24]
tomboy64 ant is okay [02:24]
wyoung How do I get dependencies? [02:25]
tomboy64 but another example of "oh, hype. need to implement. nao." [02:25]
tomboy64 build them yourself? [02:25]
wyoung DO you recommend nexus>? [02:25]
tomboy64 shrugs [02:25]
tomboy64 never worked with it [02:25]
wyoung oh [02:26]
wyoung Do you use Java for work or acedemic? [02:26]
tomboy64 i really enjoy cmake. but it's not made for java. [02:26]
wyoung I like cmake too [02:26]
tomboy64 work. but only if i have no choice. [02:26]
wyoung What would tou rather use? haskell? scala? python? [02:27]
tomboy64 scala is a language improvement. but suffers from the same ecosystem advantages/failures. [02:27]
wyoung tomboy64: hmmmmm [02:27]
tomboy64 python is decent. ecosystem is way better than java's. [02:27]
wyoung I won't confirm nor deny that statement here [02:28]
tomboy64 these days i like to work in rust. a nice improvement over c. [02:28]
wyoung I am asking for a java biased answer :) [02:28]
wyoung so I can focus my research [02:28]
tomboy64 as i said, i'm the wrong person to ask. [02:29]
tomboy64 i'd just tell you to run as fast as you can. [02:29]
wyoung I wish waz or cheeser would speak uo [02:29]
wyoung up* [02:29]
wyoung Those guys are very intelectual [02:29]
tomboy64 ) [02:30]
wyoung I value their opionio0ons [02:30]
dansan [dansan!] has joined ##java [02:33]
royal_screwup215 [royal_screwup215!a11735f1@gateway/web/cgi-irc/] has joined ##java [02:36]
royal_screwup21 [royal_screwup21!a11735f1@gateway/web/cgi-irc/] has joined ##java [02:37]
treefrob [treefrob!] has joined ##java [02:42]
dansan [dansan!] has joined ##java [02:46]
funeral [funeral!~Funeral@] has joined ##java [02:51]
LunarJetman2 [LunarJetman2!LunarJetma@] has joined ##java [03:02]
swordbeta [swordbeta!~swordbeta@unaffiliated/swordbeta] has joined ##java [03:12]
swordbeta [swordbeta!~swordbeta@unaffiliated/swordbeta] has joined ##java [03:12]
dansan [dansan!] has joined ##java [03:16]
progart [progart!~kamee@] has joined ##java [03:19]
funeral [funeral!] has joined ##java [03:23]
jrzz [jrzz!~jrzz@2001:bc8:6010:206:ae1f:6bff:fe27:2e94] has joined ##java [03:26]
royal_screwup21 [royal_screwup21!a11735f1@gateway/web/cgi-irc/] has joined ##java [03:33]
quarters [quarters!Elite20921@gateway/shell/elitebnc/x-biaeenjtylyfdtcd] has joined ##java [03:34]
quarters hello. I was wondering if it's standard to use a project generator for new projects [03:35]
yawkat it's not unusual. some people do it, some people just go for the bare-bones pom generation, some write everything themselves. [03:38]
buttsanchez [buttsanchez!] has joined ##java [03:39]
quarters is it typically best to at least know how to write everything yourself before using generators? [03:40]
quarters or can you get by with just generating a project [03:40]
rwheadon [rwheadon!~rwheadon@2600:1700:17a0:58e0:489a:8a44:57c4:2da4] has joined ##java [03:40]
yawkat there isnt that much code to generate usually [03:43]
yawkat so i dont think it really matters either way [03:43]
quarters awesome [03:43]
quarters thanks [03:43]
quadsar [quadsar!~quadsar@unaffiliated/quadsar] has joined ##java [03:43]
quarters I'm a bit confused about the relationship between gradle and maven. I thought these two were mutually exclusive to each other but I see gradle build files reference maven [03:44]
grumble [grumble!~grumble@freenode/staff/grumble] has joined ##java [03:45]
quarters is it just that maven has a repository whereas gradle doesn't [03:45]
quarters and gradle pulls dependencies from the maven repository? Or is the maven build tool somehow involved when using gradle as well? [03:45]
yawkat maven repos are fine, gradle people just dont like the actual build system, so they made their own [03:45]
yawkat no, gradle just pulls the libs from maven servers. [03:45]
quarters ah, gotcha [03:46]
quarters thanks [03:46]
orbyt_ [orbyt_!~orbyt@] has joined ##java [03:57]
quarters I'm trying to follow the dropwizard tutorial here: and javac is openjdk 12 and when running mvn package I get this error: "Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in are in the unnamed module." [03:58]
quarters does this mean that I won't be able to use the maven javadoc plugin referenced in the generated pom.xml? [03:59]
Maldivia that would be a likely candidate [04:00]
thanatos [thanatos!] has joined ##java [04:00]
veegee [veegee!] has joined ##java [04:03]
Kol [Kol!] has joined ##java [04:04]
quarters oh. I saw that the "maven-compiler-plugin" had source and target set to 1.8 and I removed both source and target tags and replaced them with a release tag with the value of 12 and that seemed to fix it [04:06]
quarters or at least it got maven to build it. does anything sound off aobut what I did here? [04:06]
kupi [kupi!uid212005@gateway/web/] has joined ##java [04:09]
perrier-jouet [perrier-jouet!] has joined ##java [04:13]
progart [progart!~kamee@] has joined ##java [04:23]
orbyt_ [orbyt_!~orbyt@] has joined ##java [04:25]
RedSoxFan07 [RedSoxFan07!] has joined ##java [04:29]
DemonWav [DemonWav!~DemonWav@unaffiliated/demonwav] has joined ##java [04:31]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [04:41]
kgrimes2 [kgrimes2!] has joined ##java [04:45]
er1k757 [er1k757!] has joined ##java [04:51]
DemonWav [DemonWav!~DemonWav@unaffiliated/demonwav] has joined ##java [04:52]
Enissay [Enissay!~Enissay@unaffiliated/enissay] has joined ##java [04:52]
iamNOTadog parted the channel: [05:25]
iamNOTadog [iamNOTadog!~nicey@2804:7f4:c780:5d0c:7e82:fd48:98ee:e49b] has joined ##java [05:27]
iamNOTadog parted the channel: [05:29]
Secret-Fire [Secret-Fire!~Secret-Fi@] has joined ##java [05:31]
cheeser stares at wyoung [05:34]
cheeser grumbles [05:34]
orbyt_ [orbyt_!~orbyt@] has joined ##java [05:36]
Renari [Renari!] has joined ##java [05:39]
slosh [slosh!~slosh@] has joined ##java [05:39]
TlrDr [TlrDr!] has joined ##java [05:39]
kgrimes2 [kgrimes2!] has joined ##java [05:48]
cakk [cakk!~nicey@2804:7f4:c780:5d0c:7e82:fd48:98ee:e49b] has joined ##java [05:50]
ricky_clarkson x256: Google open-sourced error-prone, yet another linter. I believe it can check to see if you consume a ListenableFuture and will fail compilation if you don't. [05:52]
ricky_clarkson x256: at least it behaves somewhat like that internally, not clear whether the external version behaves similarly. [05:52]
kgrimes2 [kgrimes2!] has joined ##java [05:54]
Bombe So, Spring?s @Primary. I totally get what it does but a) the only use case I can think of are test (for overriding beans with mock impls) or b) what about the non-@Primary beans? Can they even still be used? How would one get access to them with @Autowired or something? [06:06]
Maldivia Bombe: usually you would add a qualifier to the beans [06:08]
Bombe Okay but in that case there is no need for @Primary, is there? [06:08]
Maldivia well, that way you have a "default" bean, in case you don't add a qualifier where you autowire it [06:09]
Bombe So qualifiers do not help with resolution? [06:09]
Maldivia sure it does, if but then you have to specify both at declaration and usage site [06:10]
bitwinery [bitwinery!] has joined ##java [06:11]
kgrimes2 [kgrimes2!] has joined ##java [06:12]
tomboy64 just to verify, System.exit(n) is always supposed to return exit code n on the console? [06:13]
tomboy64 i'm getting 0, every time. which is pretty frustrating. [06:13]
Maldivia it's the exit code of the java process, yees [06:13]
treefrob [treefrob!] has joined ##java [06:13]
tomboy64 grml [06:13]
tomboy64 thought so [06:13]
Bombe Maldivia, hmm, okay. Well, not really important to me, I was just idly wondering. :) [06:17]
iamNOTadog [iamNOTadog!~nicey@2804:7f4:c780:5d0c:7e82:fd48:98ee:e49b] has joined ##java [06:19]
iamNOTadog [iamNOTadog!~nicey@] has joined ##java [06:26]
surial tomboy64: presumably there's a shittily written bash script in the way then [06:40]
tomboy64 surial: nah, was a picnic. i forgot to rebuild. [06:42]
tomboy64 hides in shame [06:42]
surial oof :P [06:43]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [06:48]
led_dark_1 [led_dark_1!~Thunderbi@] has joined ##java [06:49]
Arimil [Arimil!] has joined ##java [07:12]
Sina [Sina!uid230776@gateway/web/] has joined ##java [07:24]
c0ns [c0ns!] has joined ##java [07:26]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:a576:7f91:b06a:4dd4] has joined ##java [07:46]
rruizt [rruizt!] has joined ##java [08:20]
yawkat [yawkat!] has joined ##java [08:23]
orbyt_ [orbyt_!~orbyt@] has joined ##java [08:23]
immibis [immibis!] has joined ##java [08:28]
VegetarianFalcon [VegetarianFalcon!uid258908@gateway/web/] has joined ##java [08:31]
DrDonkey [DrDonkey!~DrDonkey@unaffiliated/drdonkey] has joined ##java [08:38]
nokdoot [nokdoot!~nokdoot@] has joined ##java [09:08]
crackin [crackin!~crackin@] has joined ##java [09:10]
donofrio_ [donofrio_!] has joined ##java [09:11]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [09:11]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [09:21]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [09:26]
RoriconKnight [RoriconKnight!~RoriconKn@] has joined ##java [09:32]
wpkeg [wpkeg!~kegster@unaffiliated/wpkeg] has joined ##java [09:35]
crackin [crackin!~crackin@] has joined ##java [09:42]
null1337 [null1337!] has joined ##java [09:43]
deavmi [deavmi!~deavmi@] has joined ##java [09:45]
jeromelanteri [jeromelanteri!jeromelant@gateway/vpn/privateinternetaccess/jeromelanteri] has joined ##java [09:48]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [09:49]
RedSoxFan07 [RedSoxFan07!] has joined ##java [09:50]
macroprep [macroprep!~smallvill@2405:7f00:8801:d00:845c:2c4:9407:c573] has joined ##java [09:54]
LearnAllTheTime [LearnAllTheTime!~LearnAllT@] has joined ##java [10:00]
macroprep im sorry ;-; [10:01]
rruizt [rruizt!] has joined ##java [10:01]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [10:08]
Guest48286 [Guest48286!~Jigsy@unaffiliated/jigsy] has joined ##java [10:22]
tasse [tasse!] has joined ##java [10:24]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [10:27]
macroprep_ [macroprep_!~smallvill@2405:7f00:8801:d00:1178:1a08:f391:eb75] has joined ##java [10:32]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [10:35]
Diablo-D3 [Diablo-D3!] has joined ##java [10:37]
Katana [Katana!~hentai@unaffiliated/katana] has joined ##java [10:39]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [10:40]
dj_pi [dj_pi!] has joined ##java [10:41]
Diablo-D3 [Diablo-D3!] has joined ##java [10:48]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [10:56]
Diablo-D3 [Diablo-D3!] has joined ##java [10:58]
RazielZ [RazielZ!~Raziel@unaffiliated/raziel] has joined ##java [11:00]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [11:42]
jdfthetech [jdfthetech!] has joined ##java [11:45]
t2mkn [t2mkn!~t2mkn@] has joined ##java [11:50]
Anthaas [Anthaas!~Anthaas@unaffiliated/anthaas] has joined ##java [11:55]