In my talk about the Security Manager, I demo an attack using the Attach API. The later requires to know about the PID of the JVM one wants to attach to. Because my good friend Evegeny Mandrikov couldn't attend the talk at Devoxx Ukraine, I did a private demo just for him. To get the PID of the JVM I wanted to attach to, I used the 'ps -ef | grep java' command.
This is the 8th post in the Learning Clojure focus series. This week, the subject is transducers. But before diving into that subject, we first need to talk more about reducers. If you have some experience in Java 8, you probably already know about the Stream.reduce() function. It's available in three different flavors.
When Jigsaw was released with Java 9, it was the end of a long process - it had been postponed already - and it had to be released. With the coming of Java 11, the latest Long-Term Support, I think it’s a good time to take a snapshot of the state of modularization. I’ll use the Top 20 Libraries and APIs Java Developer should know as a reference, and check for each of them if the latest version: provides an automatic module nameor has a module-info In the first case, the JAR has a
I recently acquired a Logitech Spotlight Presentation Remote to help me during my presentations. While some conferences propose clickers to speakers, not all of them do. And it’s quite inconvenient to be bound to the laptop to advance to the next slide when presenting, as I like moving around in general. When I received the remote, I was eager to test it, and I was happy to assert it worked on Google Slides. The root issue I went to a meetup just afterwards, and I couldn’t help no
Whatever the side of the fence you've been on in trainings - teacher or student, I believe we all share the same experience: it's very hard to stay focused during a couple of hours. This has only become worse in recent years, with mobile phones being a huge source of distraction. The consequence is that the most important part is the practice.
Recently, I stumbled upon one of Baeldung’s post showing how to use threads to print odd and even numbers: one thread dedicated to print odd numbers, another one to print even ones. Since I became aware of them, I was very interested in Kotlin coroutines and how they make concurrent programming code easier to read and write. I wanted to check how using coroutines would yield better code. Show me the code This is what I came up with: import java.util.concurrent.ThreadLocalRandom imp
One of the earliest and most fundamental principle one learns while coding is programming by interface. Definition Interface-based programming defines the application as a collection of components, in which Application Programming Interface (API) calls between components may only be made through abstract interfaces, not concrete classes. Instances of classes will generally be obtained through other interfaces using techniques such as the Factory pattern. — Wikipedia https://en.wiki
This is the 5th post in the JVM Security focus series. A post brought to light an interesting feature of the JDK I didn't know about: the ability to update a code running in a JVM. The referenced post shows how to apply a bugfix using that feature. The devious white hat JVM hacker in me started to think how one could apply that trick for other less beneficial purposes. And of course, how to prevent that.
When streams were added to Java 8, I wanted to jump on the bandwagon. I read blog posts, watched videos, attended workshops to understand what this was all about. After a while, I became comfortable enough… but I was unhappy with the implementation: while streams offer methods with a functional approach, legacy collections do not. When one wants to use Java capabilities on an existing collection, the later needs to be transformed to a stream, and then back again. For example, the f