Igor De Souza, Author at foojay https://foojay.io/today/author/igor-de-souza/ a place for friends of OpenJDK Tue, 31 Mar 2026 14:30:53 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://foojay.io/wp-content/uploads/2020/04/Favicon-3-2-150x150.png Igor De Souza, Author at foojay https://foojay.io/today/author/igor-de-souza/ 32 32 Does Java Really Use Too Much Memory? Let’s Look at the Facts (JEPs) https://foojay.io/today/does-java-really-use-too-much-memory-lets-look-at-the-facts-jeps/ https://foojay.io/today/does-java-really-use-too-much-memory-lets-look-at-the-facts-jeps/#comments Fri, 03 Apr 2026 07:28:09 +0000 https://foojay.io/?p=123285 Table of Contents The reputation didn’t come out of nowhere.Modern Java: What Actually Changed?1. Garbage Collection Is Not What It Used to Be2. Threads Got Lighter (Much Lighter)3. Java Objects Are Literally Getting Smaller4. The JVM Learned to Share (CDS)5. ...

The post Does Java Really Use Too Much Memory? Let’s Look at the Facts (JEPs) appeared first on foojay.

]]>
Table of Contents
The reputation didn’t come out of nowhere.Modern Java: What Actually Changed?

Breaking news: Java has been confirmed to consume all available RAM. Developers worldwide shocked.
… okay, not really. Happy April 1st.

It’s only fair to bring in the biggest liar in history to help us talk about one of the oldest myths in the Java world.

Meet Pinocchio Duke, the official Java mascot who swears up and down that “Java doesn’t use that much memory anymore!”

But every time he says it… his nose grows a little longer.

For years, “Java uses too much memory” has been one of the most repeated claims in software engineering. It’s often said with confidence, rarely with evidence, and almost always based on outdated assumptions.

So let’s do something different:
Let’s look at what modern Java actually does — backed by real improvements in the platform and the JEPs that introduced them.

The reputation didn’t come out of nowhere.

Early versions of the JVM had:

  • Less sophisticated garbage collectors
  • Longer pause times
  • Higher default memory overhead
  • Limited awareness of constrained environments

Combine that with poorly tuned applications, and Java did look memory-hungry compared to lower-level languages like C or C++.

But that was then.

Disclaimer: No wooden noses were harmed in the writing of this article. (But Duke’s might have grown a few centimeters while we were testing -Xmx flags.)


Image 01: Pinocchio Duke on April 1st: “I swear… Java doesn’t use that much memory anymore!

Modern Java: What Actually Changed?

These are the JEPs that are finally helping Duke keep his nose under control

1. Garbage Collection Is Not What It Used to Be

Modern garbage collectors are designed for low latency and efficient memory usage.

  • ZGC (JEP 333, JEP 377)
  • Shenandoah (JEP 189)
  • G1 as default (JEP 248)

These collectors:

  • Perform most work concurrently
  • Avoid long “stop-the-world” pauses
  • Scale efficiently with large heaps

Key takeaway:

Java doesn’t freeze your application anymore — it cleans memory while your app keeps running.

Modern Java doesn’t “stop the world.” It barely pauses.

2. Threads Got Lighter (Much Lighter)

One of the biggest hidden memory costs in Java used to be threads.

Traditional threads:

  • Require significant stack memory
  • Don’t scale well into the thousands

Enter Project Loom (JEP 444):

  • Introduces virtual threads
  • Extremely lightweight compared to OS threads
  • Allows thousands (or millions) of concurrent tasks

Why this matters for memory:

  • Less per-thread overhead
  • More efficient concurrency
  • Lower overall memory footprint in real systems

Thousands of threads no longer mean gigabytes of memory.

3. Java Objects Are Literally Getting Smaller

Yes, this is real.

JEP 450 – Compact Object Headers introduces:

  • Reduced object header size
  • Lower per-object memory overhead

This directly impacts:

  • Large collections
  • Data-heavy applications
  • High-throughput systems

Java objects are not just managed better — they’re physically smaller.

4. The JVM Learned to Share (CDS)

Class Data Sharing:

  • JEP 310 (Application CDS)
  • JEP 350 (Dynamic CDS Archives)

Instead of duplicating class metadata across JVM instances:

  • It can now be shared
  • Reducing total memory usage across services

This is especially useful in:

  • Microservices architectures
  • Containerized environments

5. Java Finally Understands Containers

There was a time when Java inside a container behaved… badly.

It assumed:

  • It had access to the full machine
  • Not just the container limits

That led to:

  • Over-allocation
  • OOM errors
  • The myth that “Java uses everything”

Today:

  • JVM is container-aware
  • Respects memory and CPU limits
  • Tunes itself accordingly

Java used to think it owned the machine. Now it behaves like a good citizen.

6. Project Valhalla (Value Classes & Objects) – Coming Soon

Still in preview/early access, but progressing steadily. Value objects eliminate identity and can be stored flattened (no pointer overhead). This will be a game-changer for memory density — especially for collections, records, and data-oriented programming. Expect the first preview features to land in a future JDK (possibly 27 or 28).

7. Optional: Going Even Leaner with Native Images

With GraalVM, you can compile Java into native binaries:

  • Faster startup
  • Lower memory footprint (in many cases)

It’s not a silver bullet, but it proves an important point:
Java is not tied to one runtime model anymore.

7. Others

Project Panama (Foreign Function & Memory API) — Safer, faster off-heap memory access without the old JNI tax. Leyden & AOT improvements — Better ahead-of-time caching and warmup reduction.

If you apply these tips, Duke’s nose might actually stop growing.

Real Examples: Where Memory Actually Goes

Let’s move from theory to something concrete.

Example 1
❌ A Classic Memory Problem (Unbounded Cache)

public class BadCache {
    private static final Map cache = new HashMap();

    public static String get(String key) {
        return cache.computeIfAbsent(key, k -> loadValue(k));
    }

    private static String loadValue(String key) {
        return "value-" + key;
    }
}

Problem:

  • Cache grows forever
  • No eviction policy
  • Memory usage keeps increasing

👉 This has nothing to do with Java itself.

✅ Fix: Use a Bounded Cache

import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;

public class GoodCache {
    private static final Cache cache =
        Caffeine.newBuilder()
                .maximumSize(10_000)
                .build();

    public static String get(String key) {
        return cache.get(key, k -> "value-" + k);
    }
}

Result:

  • Controlled memory usage
  • Predictable footprint

Same language. Same JVM. Completely different outcome.

Example 2 Threads vs Virtual Threads

❌ Traditional Threads

for (int i = 0; i  {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException ignored) {}
    }).start();
}

Problem:

  • Each thread ≈ ~1MB stack (default)
  • 10,000 threads ≈ ~10GB memory needed ❌

✅ Virtual Threads (JEP 444)

for (int i = 0; i  {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException ignored) {}
    });
}

Result:

  • Memory per thread: tiny (KBs instead of MBs)
  • 10,000 threads → runs comfortably

This is one of the biggest silent memory wins in modern Java.

Example 3 Object Overhead (Before vs After)

Let’s simulate a lot of small objects:

class Point {
    int x, y;
}

public class MemoryTest {
    public static void main(String[] args) {
        List points = new ArrayList();

        for (int i = 0; i < 10_000_000; i++) {
            points.add(new Point());
        }

        System.out.println("Created " + points.size() + " objects");
    }
}

What’s happening?

Each object has:

  • Header (metadata)
  • Fields (x, y)

With Compact Object Headers (JEP 450):

  • Header size is reduced
  • Total memory footprint drops significantly

👉 In large-scale systems:

  • This can save hundreds of MBs

Benchmark Snapshot

Here are simplified, realistic comparisons based on common setups:

Scenario Memory Usage
10k platform threads ~10 GB ❌
10k virtual threads ~50–100 MB ✅
Unbounded cache grows forever ❌
Bounded cache (Caffeine) stable (~50–200 MB) ✅
No CDS (multiple JVMs) high duplication ❌
With CDS reduced footprint ✅

Table 01: Benchmark

So… Does Java Use Too Much Memory?

Sometimes — but not for the reason people think.

Real causes of high memory usage:

  • Poor object modeling
  • Unbounded caches
  • Memory leaks
  • Overuse of frameworks
  • Holding references longer than necessary

In other words:

  • Most memory problems in Java are… Java developers.

Final Thoughts

Java’s reputation for high memory usage is rooted in the past.

Modern Java:

  • Uses smarter garbage collection
  • Reduces per-object overhead
  • Scales concurrency efficiently
  • Adapts to containers
  • Continues to evolve with every release

So no — Java doesn’t “use too much memory.”

Java isn’t memory-hungry. It’s memory-aware.

If your app uses 2GB, start with your code — not the JVM.

If after reading this your Java services are still using too much memory… blame the GC, not Duke. His nose is innocent this time.

Happy April 1st — and happy profiling. 🚀

The post Does Java Really Use Too Much Memory? Let’s Look at the Facts (JEPs) appeared first on foojay.

]]>
https://foojay.io/today/does-java-really-use-too-much-memory-lets-look-at-the-facts-jeps/feed/ 3
The Java in Education Catalog Now Has a Beautiful Home https://foojay.io/today/the-java-in-education-catalog-now-has-a-beautiful-home/ https://foojay.io/today/the-java-in-education-catalog-now-has-a-beautiful-home/#respond Fri, 27 Mar 2026 13:17:41 +0000 https://foojay.io/?p=123226 Table of Contents Inspired by a Great Idea from James WardMeet education.foojay.socialThe Catalog Is Only as Good as the Community Makes ItWhat's Next A few weeks ago, Igor De Souza shared Bringing Java Closer to Education: A Community-Driven Initiative here ...

The post The Java in Education Catalog Now Has a Beautiful Home appeared first on foojay.

]]>
Table of Contents
Inspired by a Great Idea from James WardMeet education.foojay.socialThe Catalog Is Only as Good as the Community Makes ItWhat's Next

A few weeks ago, Igor De Souza shared Bringing Java Closer to Education: A Community-Driven Initiative here on Foojay. It's something we started together to gather Java educational resources in one place, making it easier for mentors, educators, and learners to discover what's out there.

But let's be honest: a GitHub README, while perfectly functional, is not exactly the most inviting front door for educators who aren't already deep in the coding ecosystem. That's now fixed...

Inspired by a Great Idea from James Ward

If you haven't visited ai4jvm.com yet, go have a look. James Ward, Java Champion and Developer Advocate, built a beautifully clean, community-curated website listing Java AI frameworks, tools, key people, and learning resources. It's an excellent reference and a great example of what a well-structured catalog site can look like.

James agreed to let us reuse his workflow. It's a setup that takes a structured SPEC.md document and turns it into a proper, browsable website. A huge thank you to him for being so open about sharing that approach!

Meet education.foojay.social

The result is now live at education.foojay.social! If you're a coding club mentor or a teacher looking for Java resources to point students to, this is where to start.

What's already in the catalog? A mix of things:

  • Tutorials and videos by Jetbrains and others
  • Resources shared by Devoxx4Kids
  • Pi4J and JBang examples for getting Java running on a Raspberry Pi
  • Books like "Raising Young Coders"

The Catalog Is Only as Good as the Community Makes It

The whole point of this initiative is that it's not owned by any single person or organization. The GitHub repository at github.com/foojayio/java-education-catalog is the source of truth, and the website is generated directly from it.

That means contributing is as simple as opening a pull request to update SPEC.md with a new resource. Found a great Java tutorial series on YouTube? A book you'd recommend to beginners? A creative project idea that works well in a classroom or coding club? Add it.

If you've been creating Java educational content and it's currently sitting on the internet with little visibility, this is exactly where it should be listed. Let's make sure your content gets found more easily.

What's Next

The goal remains the same as when this initiative started: make Java more visible and accessible in educational environments, from CoderDojo clubs to university courses to self-learners picking up their first programming language. A well-maintained, community-driven catalog site gets us closer to that.

Go visit education.foojay.social, explore what's there, and then come back to the GitHub repository and add something. Every contribution matters, and this one really is as easy as editing a text file.

The post The Java in Education Catalog Now Has a Beautiful Home appeared first on foojay.

]]>
https://foojay.io/today/the-java-in-education-catalog-now-has-a-beautiful-home/feed/ 0
Gotta Code ‘Em All: How Java Evolved Beyond Verbosity – Celebrating 30 Years of Pokémon https://foojay.io/today/gotta-code-em-all-how-java-evolved-beyond-verbosity-celebrating-30-years-of-pokemon/ https://foojay.io/today/gotta-code-em-all-how-java-evolved-beyond-verbosity-celebrating-30-years-of-pokemon/#respond Fri, 27 Feb 2026 09:57:35 +0000 https://foojay.io/?p=122843 Table of Contents Java 25 – Compact Source Files and Instance Main Methods (JEP 512) Java 25 – Flexible Constructor Bodies (JEP 513) 30 Years of Pokémon. Decades of Java Evolution. LinksLinks Happy 30th Anniversary to Pokémon! 🎉 February 27, ...

The post Gotta Code ‘Em All: How Java Evolved Beyond Verbosity – Celebrating 30 Years of Pokémon appeared first on foojay.

]]>

Table of Contents


Happy 30th Anniversary to Pokémon! 🎉

February 27, 2026 marks exactly 30 years since the original Pokémon Red and Green launched in Japan on February 27, 1996. From catching your first Pokémon in Pallet Town to becoming Champion in the Indigo League, the franchise has spent three decades teaching millions of players about strategy, friendship, exploration, and constant improvement, evolving creatures, teams, and even entire generations of games.

Pokémon is literally all about evolution and that same spirit of evolution perfectly matches what’s happening in Java right now.

For a long time, people said Java was “too verbose”, too much boilerplate, too many lines just to do simple things. Writing a basic class, a main method, getters/setters, and handling nulls felt like carrying around a heavy backpack full of unnecessary items.

But Java 25 (released September 2025) is like a Pokémon finally hitting level 100 and evolving into its most powerful form. The language has shed tons of boilerplate, gained concise new syntax, and become much friendlier for beginners and quick prototyping, all while keeping its legendary strength for big enterprise systems.

Here’s how Java 25 turns the “verbose” criticism into a thing of the past, just like how Pokémon keeps reinventing itself every generation.

Java 25 – Compact Source Files and Instance Main Methods (JEP 512)

https://openjdk.org/jeps/512

The static methods that were initially available in java.io.IO (such as println, etc.) have now been relocated to java.lang.IO. Since java.lang is automatically imported by default, this shift makes them easier to use overall.

These functions now rely on System.out and System.in instead of the Console API. That said, in compact source files, the IO class's static methods aren't brought in automatically anymore, so you'll need to qualify calls with the class name explicitly.

Compact source files gain automatic entry to every public class and interface in the java.base module (essentially performing an import module java.base;).

Java 25 – Flexible Constructor Bodies (JEP 513)

https://openjdk.org/jeps/513

A key element here is constructor chaining: when a class inherits from a superclass, Java makes sure the superclass constructor executes prior to any logic in the subclass constructor. This step-by-step process ensures objects are assembled progressively from the base of the inheritance tree upward.

The enhancement addresses limitations by permitting specific statements to come before super() or this() invocations, which results in more flexible and clearer constructors.

Keep in mind this isn't a complete rundown, I highly recommend checking out the links and experimenting with some samples yourself to fully appreciate the advantages.

30 Years of Pokémon. Decades of Java Evolution.

Just like how Pokémon keeps evolving its games to stay fresh and fun for 30 years, Java keeps evolving so that you can have fun coding right away, whether you're building a Pokédex app, a tiny game, or controlling LEDs on a Raspberry Pi.

The old “Java is verbose” days are over.

The new generation is here, and it’s ready to catch every idea, build every project, and win every battle.

So the next time someone says: “Java is too verbose.”, you can answer: That was first-generation Java. We’re in Generation 25 now.

Which Java 25 feature would you use first to build your dream Pokédex or Pokémon battle simulator?

Drop it in the comments — let’s evolve our code together!
Gotta code 'em all!

LinksLinks

https://dev.to/igoriot/stop-saying-java-is-verbose-127i

The post Gotta Code ‘Em All: How Java Evolved Beyond Verbosity – Celebrating 30 Years of Pokémon appeared first on foojay.

]]>
https://foojay.io/today/gotta-code-em-all-how-java-evolved-beyond-verbosity-celebrating-30-years-of-pokemon/feed/ 0
The Triforce That Slays Legacy Java Myths – Happy 40th Zelda! https://foojay.io/today/the-triforce-that-slays-legacy-java-myths-happy-40th-zelda/ https://foojay.io/today/the-triforce-that-slays-legacy-java-myths-happy-40th-zelda/#comments Sat, 21 Feb 2026 18:13:03 +0000 https://foojay.io/?p=122800 Table of Contents The Triforce of Performance Improvements in Java 25 From 8-Bit to Open World – A Parallel Journey Java Has Leveled Up (Evolved) Happy 40th Anniversary to The Legend of Zelda! 🎉🗡️ Today, February 21, 2026, marks exactly ...

The post The Triforce That Slays Legacy Java Myths – Happy 40th Zelda! appeared first on foojay.

]]>

Table of Contents


Happy 40th Anniversary to The Legend of Zelda! 🎉🗡️

Today, February 21, 2026, marks exactly 40 years since the original game launched in Japan on February 21, 1986. From the humble 8-bit NES adventure to the breathtaking open worlds of Breath of the Wild and Tears of the Kingdom, Zelda has constantly reinvented itself. Zelda evolved.

And that spirit perfectly mirrors what’s happening in the Java world right now. Java evolved.

For years, people repeated the same sentence: “Java is slow.”, but just like saying “Zelda is still an 8-bit game,” that statement is outdated.

In The Legend of Zelda, the Triforce is a sacred golden triangle made of three smaller pieces: Power, Wisdom, and Courage. Created by the Goddesses Din, Nayru, and Farore, it grants incredible power to whoever unites all three with a balanced heart. Hidden in the Sacred Realm, it has been sought by heroes like Link and villains like Ganon for centuries, symbolizing strength, intelligence, bravery, and the perfect balance needed to save (or conquer) Hyrule.

Java 25 turns the tide and proves Java is fast, efficient, and ready for modern demands with the triforce of performance improvements.

The Triforce of Performance Improvements in Java 25

Power (Ahead-Of-Time Cache) - JEPs 483, 514, and 515

During a training run, the system profiles the application to identify the classes and methods that are actually used, then creates a highly optimized cache specifically for those elements. When the application launches, this pre-built cache is loaded directly into memory, bypassing much of the normal Just-In-Time (JIT) compilation work and delivering a much faster cold start.

JEP 515 takes this even further by incorporating detailed profiling data gathered by the JIT compiler during previous runs. This makes the AOT cache smarter and more tailored to the real-world behavior of the application, resulting in even greater efficiency.

The biggest improvements show up in applications with many classes and methods — exactly the kind of codebases that traditionally suffer long startup delays. In practice, this can cut startup time by up to 50%, depending on the workload.

Wisdom (Garbage Collector Evolution) - JEPs 521, 474 and 423

Java offers a variety of Garbage Collectors (GCs) tailored to different application requirements. With Java 25, notable enhancements have been introduced to the G1, ZGC, and Shenandoah collectors.

Shenandoah is a low-pause GC engineered to keep application stop-the-world pauses to a minimum by executing the majority of its work concurrently while the application runs. It is not the default collector in Java and is particularly well-suited for applications managing very large heaps, such as those found in Big Data environments. Thanks to JEP 521, Shenandoah now includes a generational mode in addition to its traditional non-generational mode.

ZGC has also adopted generational support through JEP 474, which has deprecated its previous non-generational mode. Since the generational approach typically delivers superior performance, future ZGC development will prioritize this mode.

Lastly, the default garbage collector in Java 25, G1, has been improved via JEP 423. These updates specifically target shorter pause times during operations that involve JNI (Java Native Interface) calls, making G1 even more efficient in mixed Java-native workloads.

Courage (Compact Object Headers) - JEPs 450 and 519

By reducing object header size from between 96 and 128 bits to only 64-bit, compact object headers bring significant heap size reductions to applications. Profiling shows up to 22% reduction in heap size and 8% less CPU time on common benchmarks.

The payoff is especially clear in object-heavy workloads and memory-constrained environments, such as those found in containers and cloud-native deployments.

From 8-Bit to Open World – A Parallel Journey Java Has Leveled Up (Evolved)

Just as Zelda has evolved from 2D pixel hero to open-world legend over 40 years, Java has evolved from “enterprise slowpoke” to a lean, high-performance champion.

A community project called java.evolved was recently launched to document how common Java coding patterns have changed across releases. Instead of explaining features in isolation, the site presents“before and after”examples: traditional idioms next to modern alternatives.

So like Zelda and Java evolved, you and your code can evolve as well.

So next time someone says: “Java is slow”, you can answer: That was the 8-bit era and we’re in the open-world era now.

Java 25 is here, and it’s no longer slow. Happy 40th Birthday, Zelda, and happy performant coding, everyone!

What Java 25 feature are you most excited to try? Drop it in the comments, let’s keep the legend alive.

The post The Triforce That Slays Legacy Java Myths – Happy 40th Zelda! appeared first on foojay.

]]>
https://foojay.io/today/the-triforce-that-slays-legacy-java-myths-happy-40th-zelda/feed/ 1
Bringing Java Closer to Education: A Community-Driven Initiative https://foojay.io/today/bringing-java-closer-to-education-a-community-driven-initiative/ https://foojay.io/today/bringing-java-closer-to-education-a-community-driven-initiative/#comments Mon, 02 Feb 2026 18:02:20 +0000 https://foojay.io/?p=122355 Table of Contents The role of this GitHub repository Why Java in Education Matters A Major Milestone: Java in CoderDojo Community Content vs. Official Raspberry Pi Foundation Material Impact on Raspberry Pi, Pi4J, and the Java Ecosystem The Challenge with ...

The post Bringing Java Closer to Education: A Community-Driven Initiative appeared first on foojay.

]]>

Table of Contents


Over the past decades, Java has proven itself to be one of the most reliable, versatile, and widely used programming languages in the world. From enterprise systems to mobile applications and embedded devices, Java continues to evolve and adapt. Yet, one important area still holds enormous untapped potential: education.

This initiative was born from a simple but powerful idea: to aggregate Java-related educational content in a way that helps newcomers get started, supports educators, and encourages new Java initiatives focused on learning. By making Java more accessible and visible in educational environments, we strengthen not only the language itself, but the entire ecosystem around it.

The role of this GitHub repository

The "Java Education Catalog" Foojay GitHub repository represents the starting point of that initiative. The idea emerged from conversations within the Code Club Slack, where educators and community members discussed the lack of visible, accessible Java resources for educational contexts. From those discussions came a simple but meaningful realization: there is already valuable Java educational content available, but it is fragmented and hard to discover.

The repository intentionally starts small and evolves openly, serving as an initial hub to gather, organize, and curate Java-related educational materials in one accessible place. Rather than presenting a finished or centrally defined curriculum, it embraces a community-driven approach—collecting learning paths, project ideas, and practical examples, especially those aligned with Raspberry Pi and physical computing.

As the initiative grows through real usage and contributions, this shared space aims to lower the barrier to entry, reduce duplicated effort, and provide a clear starting point for mentors and learners interested in Java in education, while also helping demonstrate real impact over time.

Why Java in Education Matters

Java offers a unique combination of readability, strong typing, a vast ecosystem, and long-term stability. These characteristics make it an excellent language for teaching core programming concepts such as object-oriented design, concurrency, and software architecture, skills that naturally scale from beginner projects to real-world systems.

However, many educational programs today focus primarily on languages perceived as “simpler” or more fashionable, often overlooking Java’s long-term educational value. This initiative aims to change that by curating learning paths, tutorials, examples, and community-driven resources that lower the barrier to entry and highlight Java’s strengths for learners of all ages.

A Major Milestone: Java in CoderDojo

One of the key milestones of this initiative is to see Java become a natural and visible option within the CoderDojo ecosystem.

CoderDojo, now part of the Raspberry Pi Foundation and merged into Code Club, is one of the most influential global movements for teaching young people how to code. It has empowered millions of learners worldwide through free, community-led programming clubs and high-quality educational experiences.

Having Java strongly represented within CoderDojo would be a game changer:

  • It would introduce Java to a new generation of learners early in their journey

  • It would give mentors structured, high-quality Java content they can confidently teach

  • It would position Java alongside other core technologies commonly used in educational contexts

It is important to clarify that CoderDojo and Code Club are community-led programmes and do not operate with a centrally mandated or officially prescribed curriculum for specific programming languages. There is no formal mechanism through which a language is “officially represented.” Instead, learning materials, project ideas, and educational pathways are created by the community and shared organically. A good example is the CoderDojo Belgium Google Drive which has a big collection of learning materials for different languages, electronics, robots, etc.

This model creates a valuable opportunity. If Java educational content is well designed, accessible, and appropriate for young learners and mentors, it can naturally gain traction within the CoderDojo ecosystem through real usage and community adoption.

Community Content vs. Official Raspberry Pi Foundation Material

It is also important to distinguish between community-created content and the educational resources officially developed by the Raspberry Pi Foundation within the Code Club Paths. Materials commonly associated with Raspberry Pi education, such as Python or Scratch, are developed or commissioned internally by the Foundation’s education charity, based on specific learning goals, age ranges, and strategic priorities.

There is currently no open submission pipeline for new programming languages to become part of this official curriculum. For this reason, the most effective path for Java today is not formal inclusion, but the creation of high-quality, independently published educational resources that can be shared through community channels and adopted organically by mentors and learners.

Strong community adoption can, over time, help demonstrate impact, shift perceptions, and open doors for deeper collaboration in the future.

Impact on Raspberry Pi, Pi4J, and the Java Ecosystem

This initiative has the potential to unlock significant growth for Java on Raspberry Pi. With Java more visible and accessible in educational contexts, we would naturally see:

  • Increased adoption of Java on Raspberry Pi devices
  • Stronger visibility and usage of projects like Pi4J, which bridges Java and Raspberry Pi hardware
  • More educational libraries, examples, and tooling focused on embedded and physical computing with Java

In the long term, this creates a powerful positive feedback loop: more learners lead to more contributors, more projects, and a healthier, more innovative Java ecosystem.

The Challenge with the Raspberry Pi Foundation

At present, the Raspberry Pi Foundation has not fully embraced Java as an official programming option within its educational programs. There appears to be a degree of hesitation when it comes to adopting or promoting Java alongside other supported languages.

This initiative exists precisely to help change that perception, not through confrontation, but through demonstration. By showcasing real educational content, strong community engagement, and practical results, the goal is to highlight Java’s value in learning environments and help build a compelling case for its inclusion in the broader educational ecosystem.

Connecting Existing Content Creators

Another important aspect of this initiative is recognizing that many people are already creating high-quality Java educational content around the world. Educators, developers, mentors, and enthusiasts are writing tutorials, recording videos, building sample projects, and sharing their knowledge independently.

This initiative helps connect these efforts by creating a stronger network where ideas, materials, and experiences can be shared. By bringing contributors together, we increase visibility, reduce duplicated effort, and significantly accelerate progress—allowing the community to achieve far greater impact together than any individual effort alone.

A Call to the Community

This initiative is not about a single organization or platform. It is about the community, educators, developers, mentors, and content creators, coming together to make Java more approachable and more present in education.

By aggregating content, sharing best practices, and supporting milestones like Java adoption in CoderDojo, we can ensure that Java remains not only relevant, but inspiring for future generations of developers.

If you believe in the power of education and in Java as a tool for learning, this is an open invitation: join the conversation, contribute content, and help shape the future of Java in education.

Together, we can grow Java where it matters most — at the beginning.

Recently, I had the pleasure of discussing this initiative in an interview on the Foojay Podcast You can listen to the episode #85 "Code, Community, and Opportunity: Making Tech Accessible for Everyone" here.

Links

https://github.com/foojayio/java-education-catalog

https://www.pi4j.com/

https://javapro.io/2026/01/15/java-25-jep-512-jbang-notebooks-graallpy-and-raspberry-pi-for-interactive-learning/

The post Bringing Java Closer to Education: A Community-Driven Initiative appeared first on foojay.

]]>
https://foojay.io/today/bringing-java-closer-to-education-a-community-driven-initiative/feed/ 1
Foojay Podcast #85: Code, Community, and Opportunity: Making Tech Accessible for Everyone https://foojay.io/today/foojay-podcast-85/ https://foojay.io/today/foojay-podcast-85/#respond Mon, 08 Dec 2025 06:07:00 +0000 https://foojay.io/?p=121937 Table of Contents YouTubePodcast AppsContent What if the future of Java depends on who we invite to learn it today? In this Foojay Podcast, we're diving into something that affects all of us in the Java community: How can we ...

The post Foojay Podcast #85: Code, Community, and Opportunity: Making Tech Accessible for Everyone appeared first on foojay.

]]>
Table of Contents
YouTubePodcast AppsContent

What if the future of Java depends on who we invite to learn it today?

In this Foojay Podcast, we're diving into something that affects all of us in the Java community: How can we inspire the next generation of developers, and how do we make the developer world more inclusive?

In this episode, you'll hear four incredible guests who are actively working to make tech more accessible and inclusive. First, Daniel De Luca talks about Devoxx for Kids and how they support underprivileged students in IT education. Then Kenny Schwegler shares his insights on how we can actively promote diversity and inclusion in tech. Cassandra Chin, the youngest Java Champion and author, talks about inspiring young coders through hands-on projects and making technology fun. And finally, Igor De Souza discusses his mission to bring Java into Raspberry Pi education and bring more Java into coding clubs worldwide.

These conversations share one message: Talent is everywhere, but opportunity isn't. And we have the power to change that!

YouTube

Podcast Apps

You can listen and subscribe to the Foojay Podcast on:

Content

01:19 Daniel De Luca

14:24 Kenny Schwegler

26:07 Cassandra Chin

32:45 Igor De Souza

55:27 Conclusions

The post Foojay Podcast #85: Code, Community, and Opportunity: Making Tech Accessible for Everyone appeared first on foojay.

]]>
https://foojay.io/today/foojay-podcast-85/feed/ 0
Foojay Podcast #44: Quarkus Club https://foojay.io/today/foojay-podcast-44/ https://foojay.io/today/foojay-podcast-44/#comments Mon, 04 Mar 2024 08:25:41 +0000 https://foojay.io/?p=106194 Did you know? The Quarkus Clubd initiative started less than a year ago and is already one of the biggest groups in the world dedicated to Quarkus!

The post Foojay Podcast #44: Quarkus Club appeared first on foojay.

]]>
Table of Contents
VideoPodcast AppsLinks SpeakersContentMusic

Once a month in this podcast, we talk about the history of a Java User Group and the people behind it.

In this episode, we have a special group as we visit the virtual Quarkus Club.

Did you know? The Quarkus Club initiative started less than a year ago and is already one of the biggest groups in the world dedicated to Quarkus!

Video

Podcast Apps

You can listen and subscribe to the Foojay Podcast on:

Links 

Speakers

Igor De Souza  

Luis Fabrício De Llamas 

Podcast Host: Frank Delporte

Content

00:00 Introduction of the guests 
02:35 About the Java community in Brazil 
03:06 What is the Quarkus Club? 
05:54 Languages used in the group 
06:41 Events by Quarkus Club 
07:45 Why Igor and Luis started as organizers 
10:30 Igor is the "opposite voice" 
11:04 Why use Quarkus instead of other frameworks? 
15:52 Working on a magazine 
19:57 JDK comparison project 
https://www.azul.com/openjdk-migration-for-dummies/
26:10 Plans for the future
28:04 Number of Discord members 
30:05 Questions to the listeners 
Foojay Slack
33:38 Outro 

Music

Sponsored Content

Webinar, September 10: Boost JVM Scalability & Performance With Kotlin and Azul

Kotlin’s expressive features, like coroutines and inline classes, simplify scalable code, while advanced JVM technologies, such as Azul’s optimized JIT compiler and garbage collector, help maximize runtime efficiency.

Register Now

The post Foojay Podcast #44: Quarkus Club appeared first on foojay.

]]>
https://foojay.io/today/foojay-podcast-44/feed/ 1
Foojay Podcast #22: When Profession and Fun Overlap https://foojay.io/today/foojay-podcast-22/ https://foojay.io/today/foojay-podcast-22/#respond Mon, 15 May 2023 07:47:29 +0000 https://foojay.io/?p=66470 Let's talk to volunteers from different organizations where coding is used to inspire children to become engineers.

The post Foojay Podcast #22: When Profession and Fun Overlap appeared first on foojay.

]]>
Table of Contents
Podcast AppsGuestsContent

Let's talk about programming for fun. Grab your Lego and robots, and let's talk about STEM and STEAM!

As a developer, we all get frustrated occasionally when a bug messes up our schedule, and we have to dive deep into the code to find a solution.

But still, many of us keep coding in our free time as we love to do it and want to create amazing stuff.

In this episode of the Foojay Podcast, we talk to volunteers from different organizations where coding is used to inspire children to become engineers or at least learn to make good use of computers and the tools around them.

Podcast Apps

You can listen and subscribe to the Foojay Podcast on:

Guests

Content

The post Foojay Podcast #22: When Profession and Fun Overlap appeared first on foojay.

]]>
https://foojay.io/today/foojay-podcast-22/feed/ 0
Control your Arduino with Spring https://foojay.io/today/control-your-arduino-with-spring/ https://foojay.io/today/control-your-arduino-with-spring/#respond Sat, 25 Mar 2023 07:21:04 +0000 https://foojay.io/?p=65486 Learn how to use Firmata4j to control an Arduino board from a Raspberry Pi board or directly from your computer.

The post Control your Arduino with Spring appeared first on foojay.

]]>
Table of Contents

Have you ever wanted to control your Arduino board from a Raspberry Pi, or your computer, using only Java and not the Arduino language?

In this article, I show how I created a web app to control my Arduino with a Raspberry PI using Spring. And so this is another article about Java on Raspberry PI or perhaps this time I can say Java and Arduino.


Idea

A simple Spring app where I can create a REST interface to control one of the Arduino GPIOs. I can plug a LED and build a simple blink LED example.

Connect the Arduino with a Raspberry Pi and run my Spring application from the Raspberry Pi.
It’s been a while since I wanted to do this test and nothing better than to do it to celebrate Arduino Day.

Every year, Arduino Day is celebrated around the world with lots of workshops, meetups and events. People show off their projects on Social Media with Hashtag #ArduinoDay2023. Arduino Day is the perfect time to recognize the incredible community as well. This year marks the 10th anniversary of Arduino Day, and what a great milestone to celebrate together.

Let’s have a look at a simple architecture for this idea.


Picture 1: Simple Architecture

In simple words, the Raspberry Pi or any computer sends commands to the Arduino that just execute the actions.

It's possible to use Serial Communication, used for communication between the Arduino board and a computer or other devices. All Arduino boards have at least one serial port (also known as a UART or USART), and some have several.

For this, you need to write a program that reads and writes to the serial port. It’s nothing complicated to do, but you can use something simpler and something that is already done, the Firmata.

It is a nice idea to use Firmata if you want all the logic of your program to be on your computer, while the Arduino board only executes orders (actuates hardware pins), and gives back some information (reads hardware pins). You want to make your Arduino more dynamic, and export the brain of the Arduino into your computer. Put in other words, you want to write the firmware logic on your computer, not on the Arduino.
Firmata

In simple words, Firmata is an intermediate protocol that connects an embedded system to a host computer, and the protocol channel uses a serial port by default. The Arduino platform is the standard reference implementation for Firmata and the Arduino IDE comes with support for Firmata.

You can simply upload the Firmata to your Arduino and just use your time to write the client code, the code that will communicate with the Arduino. The Arduino Firmata code is already done for you and you just need to make sure that your code sends the instructions that are compatible with the Firmata code. This client code can be in any language, and there are a lot of libs to help you with that. Here I’ll show an example using Firmata4j.

Fun fact, Firmata is an Italian word and means something like: “Signed”

Firmata4j

firmata4j is a client library of Firmata written in Java. The library allows controlling Arduino and other Arduino compatible boards which run Firmata protocol from your java program.

To connect to the device via serial port it uses a lib for serial communication. Firmata4j works with jSerialComm and jssc, but there is another famous one, RXTX.

Plug your Arduino directly into your Raspberry Pi board, using the USB cable.


Picture 2: full idea Architecture

A Spring app that is running on the Raspberry Pi, it uses the Firmata4j to send commands to the Arduino. The Arduino itself is just running the Firmata code that receives the command and executes that action. In this example, it just blinks the LED.

Setup Arduino

You just need to upload the Firmata code to your Arduino and that is it.

In your Arduino IDE if you can’t see “Firmata” under “Examples” it means that the Firmata library is not installed, and It also surely means that your Arduino IDE is not up to date, since for recent releases, Firmata is automatically included.

You can check under "Sketch" > "Include Library" > "Manage Libraries" > Write "firmata" in the search bar, and you’ll find the Firmata library "Firmata Built-In by Firmata Developers".

Now that you have Firmata on your Arduino IDE, select the StandardFirmata sketch example.


Picture 3: Arduino IDE

You can check the Firmata code or just ignore and upload it to your Arduino board.
That’s all you need to do on the Arduino side.

Code example

Let’s create a simple code that reminds us of an Arduino code.

public static void main(String[] args) throws IOException, InterruptedException {
    try {
        setup();
        loop();
    } finally {
        device.stop();
    }
}

private static final void setup() throws IOException, InterruptedException {
    device.start();
    device.ensureInitializationIsDone();
    System.out.println("Device is ready");
}

private static final void loop() throws IOException, InterruptedException {
    while (true) {
        Pin pin = device.getPin(13);
        pin.setMode(OUTPUT);
        for (int i = 0; i < 10; i++) {
            pin.setValue(1);
            Thread.sleep(500);
            pin.setValue(0);
            Thread.sleep(500);
        }
    }
}

Here is a simple code that just blinks the Arduino LED.

Spring App

Now let's create a simple Spring application where it can make available a REST interface to control one of the Arduino GPIO. Therefore we can turn on and turn off the LED just by calling the REST interface.

@EventListener
public void onApplicationEvent(final ContextRefreshedEvent event) {
    try {
        // You can check your USB port name on the Arduino IDE, on the OS you are using
        device = new FirmataDevice("/dev/ttyACM0");
        device.start();
        device.ensureInitializationIsDone();
    }catch(InterruptedException e){
        e.fillInStackTrace();
    }catch(IOException e){
        e.fillInStackTrace();
    }
    return;
}

I use the @EventListener annotation to run logic after the Spring context has been initialised and I do the device connection.

You can check all the code on GitHub.

https://youtu.be/4B4WHhOf5I4
Video 1: Arduino led blink

Next Steps

I’m using my Arduino Mega, but this code can be used in other Arduino compatible boards as well, including the ESP family and others. Check out the supported board list here.

Looks like that there is no support for RP2040, and this means that you can not use a Raspberry PI Pico yet. There are a lot of Firmata implementations with minor changes, and I found one, ConfigurableFirmata, that looks like it can support a Raspberry PIco. But this could be an entire blog.

Another idea here could be to implement some kind of interface to use to interact with the Arduino and test this implementation with others web frameworks as well, like Micronaut and Quarkus.

It would be nice to try out this with Kotlin and/or Scala.

Conclusion

In this tutorial, you have seen how to use Firmata4j to control an Arduino board from a Raspberry Pi board or directly from your computer.

With Firmata, you can just focus on the client code and forget about what is running inside the Arduino.

Your Java code can also interact with any other library you have on your Raspberry Pi.

It’s great because you don’t have to have 2 programs (1 for Raspberry Pi and 1 for Arduino), you can just write everything in one program, while Firmata4j takes care of the rest.

I didn't show anything very complex and I barely touched the surface of what is possible to do with Firmata.

This example proves that it is possible to control your Arduino with a Spring web application and it is really handy to combine with a Raspberry Pi.

There are other Firmata options and implementations as well, and of course, you can write your code instead of using a Firmata and customise it in the way that you want.

Remember to use the hashtag #JavaOnRaspberryPi on Twitter to show the world Raspberry Pi with Java.

In this case, why not #ArduinoWithJava, and of course don’t forget to celebrate Arduino Day.

Check out #ArduinoDay2023

Links

https://day.arduino.cc/about

https://blog.arduino.cc/2023/02/01/arduino-day-turns-10-but-you-are-a-10/

https://github.com/firmata/protocol

https://github.com/firmata/arduino

http://www.firmata.org/wiki/Main_Page

https://github.com/kurbatov/firmata4j

https://github.com/firmata/ConfigurableFirmata

https://github.com/MrYsLab/telemetrix-rpi-pico

https://github.com/execuc/u2if

http://igfasouza.com/blog

The post Control your Arduino with Spring appeared first on foojay.

]]>
https://foojay.io/today/control-your-arduino-with-spring/feed/ 0
Controlling an LCD Display with Spring and Thymeleaf on the Raspberry Pi https://foojay.io/today/controlling-an-lcd-display-with-spring-and-thymeleaf-on-the-raspberry-pi/ https://foojay.io/today/controlling-an-lcd-display-with-spring-and-thymeleaf-on-the-raspberry-pi/#respond Wed, 19 May 2021 07:10:12 +0000 https://foojay.io/?p=44920 Igor De Souza shares on his blog a lot fun and inspirational experiments with Java on Raspberry Pi. Some of those were already shared here on Foojay.io.

This time we want to highlight his work which combines a web app made with Spring and Thymeleaf, to control an LCD display connected to a Raspberry PI.

The post Controlling an LCD Display with Spring and Thymeleaf on the Raspberry Pi appeared first on foojay.

]]>
Table of Contents
Frameworks and componentsWiringProject ideaCodeResultLinks

Igor De Souza shares on his blog a lot fun and inspirational experiments with Java on Raspberry Pi. Some of those were already shared here on Foojay.io:

  1. Electronics & Quarkus Qute on Raspberry Pi
  2. Electronics & Micronaut Velocity with Raspberry Pi
  3. Vert.x Example on the Raspberry Pi with a Virtual Potentiometer

This time we want to highlight his work which combines a web app made with Spring and Thymeleaf, to control an LCD display connected to a Raspberry PI.

Frameworks and components

  1. Spring Boot is an extension of the Spring framework, which eliminates the boilerplate configurations required for setting up a Spring application.
  2. Thymeleaf is a Java template engine for processing and creating HTML, XML, JavaScript, CSS, and text.
  3. The LCD display is an ST7920 model (or 12864ZW), which is probably the cheapest 128×64 graphic LCD that you can find.
  4. This "Universal Character/Graphics LCD Library for Java" by Rafael Ibasco is used to control the display.

Wiring

The display is connected according to this table indicating the physical PIN number and its according BCM number used in the code:

Project idea

Goal of this project, is to setup a simple Spring Boot Thymeleaf application, which shows a form with a 128×64 table. Each table position is the representation of a pixel of the LCD graphic display. This is achieved by using an array of bits with all the positions of this table.

The user interface is limited with a button to convert the table to an array, and one to create a preview picture of the result.

The LCD graphic Display expects an Array of Bytes in the XBM format. XBM is a monochrome bitmap format in which data is stored as a C language data array. It is primarily used for the storage of cursor and icon bitmaps for use in X graphical user interfaces.

A method was added to the application to convert the Array of bits into an Array of Bytes to match the XBM format.

Many tools including GIMP can save an image as XBM. A nice step-by-step instruction that the API docs show is here.

Code

A few examples of the code in the project.

This part configures the control of the LCD display with the BCM pin numbers listed above in the table.

config = GlcdConfigBuilder
       //Use ST7920 - 128 x 64 display, SPI 4-wire Hardware
       .create(Glcd.ST7920.D_128x64, GlcdCommProtocol.SPI_SW_4WIRE_ST7920)
       //Set to 180 rotation
       .option(GlcdOption.ROTATION, GlcdRotation.ROTATION_180)
       .option(GlcdOption.PROVIDER, Provider.SYSTEM)
       .mapPin(GlcdPin.SPI_MOSI, 19)
       .mapPin(GlcdPin.SPI_CLOCK, 13)
       .mapPin(GlcdPin.CS, 26)
       .build();

Converting the bits array to a byte array for the XBM format:

private static byte[] encodeToByteArray(int[] bits) {
    BitSet bitSet = new BitSet(bits.length);
    for (int index = 0; index  0);
        bitSet.set(index, bits[index] > 0);
    }
    return bitSet.toByteArray();
}

You can get the full code from this GitHub repository.

Result

There are some XBM files inside the resources folder and you can follow up on the API example to display these images.

Some additional work is still needed to finish the logic for a combobox to show all XMB files inside resources and once selected, display that image on the LCD. But as you can see in this video, the Thymeleaf table can already be used to draw an image, which can be displayed on the screen.

Remember to use the hashtag #JavaOnRaspberryPi on Twitter to show the world Raspberry Pi with Java.

Links


Originally shared by Igor De Souza on his blog.

The post Controlling an LCD Display with Spring and Thymeleaf on the Raspberry Pi appeared first on foojay.

]]>
https://foojay.io/today/controlling-an-lcd-display-with-spring-and-thymeleaf-on-the-raspberry-pi/feed/ 0