Java™ Community
- Osrs Plugin Runelite Development: PvP Helper – Part 1
PvP (Player versus Player) plugin using the RuneLite API. The development is presented in a tutorial format, and this Part 1 of the guide
- Seeking working example of Junit5 and code coverage with maven
This is kind of an open question for me: does any code coverage tool work in Java with Junit5? I'll admit that I'm no Java configuration specialist, so I find the complexity of XML-based configuration systems to be quite opaque. I've got a few simple Maven-based build projects on hand and I wanted to add code coverage to the test harnesses. Unfortunately, I have never managed to get one stood up and running. I do this all the time with Python pytest/coverage tools, but it's been elusive for Java projects.
Could someone here please point me to a working example of any Java project using Maven / Junit5 / [any code coverage system]?
My latest attempt to get a working example came from this howto: https://howtodoinjava.com/junit5/jacoco-test-coverage/
But, it once again gave me the: [INFO] --- jacoco-maven-plugin:0.8.7:report (default-report) @ JUnit5Examples --- [INFO] Skipping JaCoCo execution due to missing execution data file.
As near as I can tell, JaCoCo just never runs. Ever. It's been very frustrating. I've read tutorials, followed suggestions on configuring surefire in various ways. I've pulled misc repo that claim to have it working. I've tried different computers with different OSes, versions of java, different maven installs, etc. There's something somewhere that I'm missing and after months of off and on attempts to get this working I'm at my wit's end.
Please help.
- Organising our Java Communities
What's the best way to help Lemmy users organise into productive communities?
On Reddit we have:
r/java
- Java news and discussion. Not about learning the language or getting help with Java problemsr/learnjava
- learning to use the Java language, platform, its tools, or parts of its ecosystem (libraries)r/javahelp
- Getting help with Java (in practice, much the same content asr/learnjava
)
So far, on Lemmy I've found the following (with only the very start of an active membership building up in each)
- Java™ Community@lemmy.ml - One option for replacing
r/java
- java@programming.dev - Another candidate for replacing
r/java
- Learn Java@lemmy.world - a possible replacement for
r/learnjava
andr/javahelp
Are there other communities out there already?
How do we avoid fragmentation? Where there's overlap, are there reasoned opinions on how to converge (eg matching instance policies to the audience)?
Do we just encourage communities to peer-link until critical mass develops and community activity-levels speak for themselves? Or is that just likely to split the community until community owners promote migration towards a 'common space' for each type of content?
- Eclipse compiler issue
I am wondering if anyone can help me.
I have an issue with compiling some code in Eclipse but not with IntelliJ or javac.
I am using sneakyThrow to bubble a checked exception up through 2 streams.
Here is the smallest reproducible code I can make:
``` import java.io.IOException; import java.util.List; import java.util.function.Predicate; import java.util.stream.Collectors;
public class Example { public static void main(String[] args) throws IOException { List<List<Integer>> input = List.of(List.of(1, 2), List.of(2, 4));
// Should return any List whose elements are all even. List<List<Integer>> output = input.stream() .filter(bubblePredicate(o -> o.stream() .allMatch(bubblePredicate(i -> { if (i > 10) { throw new IOException("Number too large."); } return i % 2 == 0; })))) .collect(Collectors.toList());
System.out.println(output); }
private interface ThrowingPredicate<S, E extends Exception> { boolean test(S s) throws E; }
private static <S, E extends Exception> Predicate<S> bubblePredicate(ThrowingPredicate<S, E> callable) throws E { return s -> { try { return callable.test(s); } catch (Exception e) { sneakyThrow(e); return false; } }; }
private static <E extends Throwable> void sneakyThrow(Exception exception) throws E { throw (E)exception; } } ```
Compiles and runs completely fine with
javac 11.0.12
, but doesn't onEclipse 4.21.0.I20210906-0500
norEclipse 4.27.0.20230309-1200
.Has anyone encountered this before, or have any idea what I am misunderstanding?
- Is this the future of Java?yewtu.be Is this the future of Java?
Tuples, templating, type-safe data access, units and measurements, extension methods, and countless other features exist, seemingly in perpetuity, in every language but Java! But no longer, thanks to the Manifold project. Is this the future of Java? #javaprogramming #java #Jvm #Kotlin #Scala #Groovy...
> Tuples, templating, type-safe data access, units and measurements, extension methods, and countless other features exist, seemingly in perpetuity, in every language but Java! But no longer, thanks to the Manifold project.
There is an interesting reddit thread discussing whether Manifold is actually a JVM language and not just a "Java compiler plugin".
- OpenJDK Proposes Project Galahad to Merge GraalVM Native Compilationwww.infoq.com OpenJDK Proposes Project Galahad to Merge GraalVM Native Compilation
OpenJDK has proposed a new OpenJDK Project, codenamed Galahad, to merge some of the GraalVM Native Compilation technologies into the OpenJDK codebase.
- Structured concurrency in Java with Loomwww.davidvlijmincx.com Structured concurrency in Java with Loom
We take a look at how to use structured concurrency in Java with Project Loom.
- What is Spring Framework? An Unorthodox Guidewww.marcobehler.com What is Spring Framework? An Unorthodox Guide
You can use this guide to understand what Spring framework is and how its core features like dependency injection or aspected oriented programming work. Also, a comprehensive FAQ.
I wanted to start learning Java's Spring Framework and Spring Boot. Coming from Node.JS, I found this article to be an amazing introduction to Spring's concepts.
- Log4j Lookups in Depth // Log4Shell CVE-2021-44228 - Part 2 - YouTube
YouTube Video
Click to view this content.
- [SOLVED]Eclipse disappeared from the official repos / Applications
cross-posted from: https://lemmy.ml/post/84798
> Mmm. A lot of legacy plugins works with Eclipse components. 😥
- A Simple OpenPGP APIblog.jabberhead.tk A Simple OpenPGP API
In this post I demonstrate how easy it is to perform OpenPGP operations in your application by using the SOP API.
- [JDK] Java Is Still Free | Mediummedium.com Java Is Still Free 3.0.0 (Ocrt 2021)
With the changes to Oracle JDK distribution and support, there has been considerable uncertainty over the rights to use Oracle JDK vs…
- [RISC-V] [Simulator] TheThirdOne/rars: RARS -- RISC-V Assembler and Runtime Simulatorgithub.com GitHub - TheThirdOne/rars: RARS -- RISC-V Assembler and Runtime Simulator
RARS -- RISC-V Assembler and Runtime Simulator. Contribute to TheThirdOne/rars development by creating an account on GitHub.
- [Game] [OpenSource] Terasology Project | Home
The Terasology project was born from a Minecraft-inspired tech demo and is becoming a stable platform for various types of gameplay settings in a voxel world. The creators and maintainers are a diverse mix of software developers, designers, game testers, graphic artists, and musicians. We encourage others to join!
- [JDK] Good-bye AdoptOpenJDK. Hello Adoptium! | AdoptOpenJDK Blogblog.adoptopenjdk.net Good-bye AdoptOpenJDK. Hello Adoptium!
AdoptOpenJDK has moved to Eclipse Adoptium. A few words on how we are supporting the transition to Eclipse Temurin.
- [JavaScript] [Engine] mozilla/rhino: Rhino is an open-source implementation of JavaScript written entirely in Javagithub.com GitHub - mozilla/rhino: Rhino is an open-source implementation of JavaScript written entirely in Java
Rhino is an open-source implementation of JavaScript written entirely in Java - GitHub - mozilla/rhino: Rhino is an open-source implementation of JavaScript written entirely in Java
- Where to find NetBeans 7/8 without jdk?
If you know where such versions are located, please link here. I can't seem to find it anywhere and don't want to install the one bundled with oracle jdk because I already have openjdk installed on my system.
- Supreme Court Sides With Google in Oracle Copyright Casewww.businessinsider.com Supreme Court sides with Google in Oracle copyright case
The court ruled that Google's use of Oracle-developed Java code "did not violate the copyright law" and was done under fair-use provisions.
SCOTUS decided that Google's particular use of the Java SE API is permitted by the fair use doctrine.
- Pippo micro web framework in Java
"The goal of this project is to create a micro web framework in Java that should be easy to use and hack. Pippo can be used in small and medium applications and also in applications based on micro services architecture."
- How PVS-Studio Checked ELKI in Januarywww.viva64.com How PVS-Studio checked ELKI in January
If you feel like the New Year just came, and you missed the first half of January, then all this time you′ve been busy looking for tricky bugs in the code you maintain. It also means that our article...
If you feel like the New Year just came, and you missed the first half of January, then all this time you've been busy looking for tricky bugs in the code you maintain. It also means that our article is what you need. PVS-Studio has checked the ELKI open source project to show you errors that may occur in the code, how cunningly they can hide there, and how you can deal with them.
- Playing around routing code in Spring's API gateway frameworkqua.name Smarter routing in Spring Cloud Gateway
Another day, another Spring Cloud Gateway story. I've previously written about customizing its underlying Netty server and how the framew...
- Top-10 Bugs in Java Projects in 2020www.viva64.com Top 10 bugs in Java projects in 2020
The New Year is steadily approaching, therefore it′s time to sum everything up. Continuing the tradition, we thought back to our articles about checking Java projects from the open-source world for...
The New Year is steadily approaching, therefore it's time to sum everything up. Continuing the tradition, we thought back to our articles about checking Java projects from the open-source world for this year and rated the top 10 most exciting bugs.
- Awesome-javagithub.com GitHub - akullpp/awesome-java: A curated list of awesome frameworks, libraries and software for the Java programming language.
A curated list of awesome frameworks, libraries and software for the Java programming language. - GitHub - akullpp/awesome-java: A curated list of awesome frameworks, libraries and software for the...
A curated list of awesome frameworks, libraries and software for the Java programming language.
- Big / Bug Data: Analyzing the Apache Flink Source Codewww.viva64.com Big / Bug Data: analyzing the Apache Flink source code
Applications used in the field of Big Data process huge amounts of information, and this often happens in real time. Naturally, such applications must be highly reliable so that no error in the code...
Applications used in the field of Big Data process huge amounts of information, and this often happens in real time. Naturally, such applications must be highly reliable so that no error in the code can interfere with data processing. To achieve high reliability, one needs to keep a wary eye on the code quality of projects developed for this area. The PVS-Studio static analyzer is one of the solutions to this problem. Today, the Apache Flink project developed by the Apache Software Foundation, one of the leaders in the Big Data software market, was chosen as a test subject for the analyzer.
- Is there a way to search for which Java/JVM package contains a specific class?
Say I want a class called "com.mysql.cj.jdbc.Driver" but I don't know what Gradle or Maven dependency contains it. Is there a place I can just type in the full class name and get results on what publicly available JVM packages contain it? Googling a lot these class names don't return much useful information on where I can go to import it into my project.
- Analyzing Java Code in IntelliJ using PVS-Studio Analyzer | How to find bugs in your Java Code
YouTube Video
Click to view this content.
- Checking WildFly, a JavaEE Application Serverwww.viva64.com Checking WildFly, a JavaEE application server
WildFly (formerly known as JBoss Application Server) is an open-source JavaEE application server developed and first released by JBoss in February, 2008. The primary goal of the project is to provide...
WildFly (formerly known as JBoss Application Server) is an open-source JavaEE application server developed and first released by JBoss in February, 2008. The primary goal of the project is to provide a set of tools usually required for enterprise Java applications. And since the server is used for developing enterprise applications, it is especially important to minimize the number of bugs and potential vulnerabilities in its code. Today, WildFly is being developed by the large company Red Hat, and they keep the code quality at a pretty high level. That said, our analyzer was still able to find a number of programming mistakes in the project.
- Checking the Code of XMage, and Why You Won't Be Able to Get the Special Rare Cards of the Dragon's Maze Collection
XMage is a client-server application for playing Magic: The Gathering (MTG). XMage's development was started in early 2010. Since then, it has seen 182 releases, attracted an army of contributors, and it's still being actively developed even now. All that makes it a good reason for us to contribute to its development too! So, today the PVS-Studio unicorn is going to check the code base of XMage and maybe even get into a fight with some entities.
- Under the Hood of PVS-Studio for Java: How We Develop Diagnosticswww.viva64.com Under the hood of PVS-Studio for Java: how we develop diagnostics
To keep it interesting, this time I′d like to tell about our approach to developing and polishing diagnostic rules for PVS-Studio Java. You will learn how we keep existing warnings consistent across...
To keep it interesting, this time I'd like to tell about our approach to developing and polishing diagnostic rules for PVS-Studio Java. You will learn how we keep existing warnings consistent across releases and why the new ones aren't too weird. I'll also share a bit of inside information on what plans we, the Java team, have for the future, and show you a few interesting (and a few plain) bugs we found using the diagnostics from the upcoming release.