Your mission, should you choose to accept it: Master #JVM memory like a pro.
Join @hansolo_ Oct. 6-9 at #JCONUSA25 @ #IBM #TechXchange in Orlando. Dive into garbage collection secrets and take your #Java skills to the next level.
🎟️ Secure your spot now: usa.jcon.one/register
#JCON2025
07.08.2025 09:30 — 👍 2 🔁 1 💬 0 📌 0
Fisher2760 - Twitch
FisherTech:Skyblock Wasteland Develpment. Pack Dev
FisherTech:Skyblock Wasteland Develpment. Pack Dev twitch.tv/fisher2760
#minecraft #java #javsscript #coding #develpment #uk #disabled
07.08.2025 09:15 — 👍 1 🔁 1 💬 0 📌 0
How to Manage Your JDKs With SDKMAN
In this blog, you will learn how to manage several Java Development Kits (JDKs) on your Linux system using SDKMAN. Besides JDKs, several other SDKs can be managed by means of SDKMAN. Enjoy!
In this blog, you will learn how to manage several Java Development Kits (JDKs) on your Linux system using SDKMAN. Besides JDKs, several other SDKs can be managed by means of SDKMAN. Enjoy!
#java
07.08.2025 08:48 — 👍 1 🔁 1 💬 0 📌 0
#java
07.08.2025 07:53 — 👍 1 🔁 1 💬 0 📌 0
Bean There, Dung That
The Wild, Weird, and Worrisome Truth About Kopi Luwak
#poop #coffee #KopiLuwak #java #Musang #Sumatra #Java #Bali #Sulawesi #palmcivet #civet #writingcommunity #amwriting #amediting #WIPwarmup #WIP #wordcount #wordcraft #shortstories #amateurwriter #substack #diary #writer #poetry #digitaldiary #reading #6amwritersclub #5amwritersClub #Justwrite 🖖
07.08.2025 07:15 — 👍 2 🔁 1 💬 0 📌 0
Counting Millions of Things with Kilobytes
A Hands-On Quarkus Tutorial for Scalable Unique Counting with HyperLogLog
buff.ly/7avObMX
#Java #Quarkus #GitHub #HyperLogLog
07.08.2025 06:25 — 👍 3 🔁 2 💬 0 📌 0
Lo que se puede hacer con las fuentes en iText 7
Creo ya lo había mencionado pero iText tuvo ese enorme cambio de la versión 5 a la 7 de modo que al ver un tutorial existe la posibilidad de no apliqué a la versión que esta usando.
Y esto se refleja doble con el manejo de las fuentes ya que encima del cambio de versión varias de las funciones y constantes fueron descontinuadas en una versión intermedia, buena suerte hallando las nuevas.
Así que, para tener todo en el mismo lugar, hagamos un acordeón sobre el uso de fuentes en iText 7.
## Usando fuentes en iText 7.
El primer paso es saber como funcionan las fuentes en iText 7, las fuentes son representadas por objetos _PdfFont_ las cuales pueden ser asignadas a los objetos compatibles (Como por ejemplo _Paragraph_ y _Text_) vía el método _setFont_ de esos objetos.
PdfFont font = PdfFontFactory.createFont(StandardFonts.TIMES_ROMAN);
author.setFont(font);
Los objetos _PdfFont_ se crean con ayuda de _PdfFontFactory_ con el cual podemos especificar el nombre de la fuente o cargar un archivo externo.
Una vez que halla creado el objeto _PdfFont_ puede usarlo en cualquier parte de su documento.
## Usando las fuentes predeterminadas
iText incluye consigo una pequeña cantidad de fuentes ya listas para usarse, que si bien no le van a ganar ningún concurso de diseño están muy a la mano para hacer mas legible su documento.
Estas fuentes se representan con las constantes contenidas en la clase _StandardFonts_ que son las siguientes.
Fuentes Estándar de iText 7
(No se espante por el mensaje de error, es solo la falta del javadoc), basta con pasarle la constante de la fuente que desea al método _createFont_ de _PdfFontFactory_ y con eso ya tendrá el objeto _PdfFont_ para aplicar esa fuente.
## Tamaño de fuente
Para cambiar el tamaño de la fuente de un elemento de texto (_Text_ , _Paragraph_ , etc) debe usar el método _setFontSize_ del elemento del que desea cambiar el tamaño y pasarle de argumento el tamaño de fuente que desea tenga.
textoSize.setFontSize(25f);
## Usando fuentes externas
Si las fuentes incluidas con iText no bastan para lo que necesita puede cargar y usar una fuente desde un archivo .ttf, esto requiere un par de pasos adicionales, pero no es nada complicado.
Lo primero que debe de hacer es crear un objeto _FontProgram_ con ayuda del método _createFont_ del objeto _FontProgramFactory_ este método recibe de argumento la ruta al archivo ttf, como se ve a continuación.
String rutaFuente = "PressStart2P.ttf";
FontProgram fontProgram = FontProgramFactory.createFont(rutaFuente);
Ya que tenga el objeto _FontProgram_ de la fuente del archivo puede usarla para crear el objeto _PdfFont_ con ayuda del método _createFont_ de _FontFactory_.
PdfFont fuenteExterna = PdfFontFactory.createFont(fontProgram, PdfEncodings.WINANSI, true);
El método _createFont_ toma tres argumentos, la fuente que deseamos usar, la codificación y si la fuente debe de guardarse dentro del PDF resultante, los argumentos que se muestran arriba le funcionaran bien en la mayoría de los casos.
Ya que tenga el objeto _PdfFont_ puede usarlo como se ha estado usando previamente.
Text textoFuenteExterna = new Text("Texto con una fuente externa ");
textoFuenteExterna.setFont(fuenteExterna);
## Combinando diferentes tipos, tamaños y estilos de fuente
Y claro todo lo que se aplico previamente se puede usar en conjunto para hacer que el texto tenga el color, fuente y tamaño que desee, es sencillo como aplicar los métodos indicados
Text textoTodo = new Text("Texto al que le aplicamos todo lo aprendido");
textoTodo.setFont(fuenteExterna);
textoTodo.setFontColor( ColorConstants.ORANGE );
textoTodo.setFontSize(45f);
## Ejemplo
Ahora veamos como se ve todo lo anterior en un solo programa
package com.hash.databaseio.fuentesitext;
import com.itextpdf.io.font.FontProgram;
import com.itextpdf.io.font.FontProgramFactory;
import com.itextpdf.io.font.PdfEncodings;
import com.itextpdf.io.font.constants.StandardFonts;
import com.itextpdf.kernel.font.PdfFont;
import com.itextpdf.kernel.font.PdfFontFactory;
import com.itextpdf.kernel.pdf.PdfDocument;
import com.itextpdf.kernel.pdf.PdfWriter;
import com.itextpdf.layout.Document;
import com.itextpdf.layout.element.Paragraph;
import com.itextpdf.layout.element.Text;
import com.itextpdf.kernel.colors.ColorConstants;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author draygoza
*/
public class App {
static final private Logger LOGGER = Logger.getLogger("com.hash.databaseio.fuentesitext.App");
static public void main(String[] args) {
try {
File archivo = new File("fuentes.pdf");
PdfDocument pdf = new PdfDocument(new PdfWriter(archivo));
try (Document document = new Document(pdf)) {
// Creamos el objeto para usar la fuente Times Roman
PdfFont fuenteTimesRoman = PdfFontFactory.createFont(StandardFonts.TIMES_ROMAN);
// Creamos el objeto para usar la fuente Times Bold
PdfFont fuenteTimesBold = PdfFontFactory.createFont(StandardFonts.TIMES_BOLD);
// Texto al que le aplicaremos las fuentes
Text textoBold = new Text("Texto usando Times Bold ");
Text textoRoman = new Text("Texto usando Times Roman ");
textoBold.setFont(fuenteTimesBold);
textoRoman.setFont(fuenteTimesRoman);
// Texto que le cambiaremos el tamaño
Text textoSize = new Text("Texto de otro tamaño");
textoSize.setFont(fuenteTimesBold);
textoSize.setFontSize(25f);
Paragraph parrafo = new Paragraph();
// Texto de otro color
Text textoColor = new Text("Texto en otro color ");
textoColor.setFontColor(ColorConstants.MAGENTA);
// Fuente externa
// Indicamos la ruta al archivo de la fuente
String rutaFuente = "PressStart2P.ttf";
FontProgram fontProgram = FontProgramFactory.createFont(rutaFuente);
PdfFont fuenteExterna = PdfFontFactory.createFont(fontProgram, PdfEncodings.WINANSI, true);
Text textoFuenteExterna = new Text("Texto con una fuente externa ");
textoFuenteExterna.setFont(fuenteExterna);
// Ahora juntaremos todo
Text textoTodo = new Text("Texto al que le aplicamos todo lo aprendido");
textoTodo.setFont(fuenteExterna);
textoTodo.setFontColor( ColorConstants.ORANGE );
textoTodo.setFontSize(45f);
// Puede usar varias fuentes en un mismo parrafo aplicando la
// fuente a uno o varios Text y agregandolos al parrafo
parrafo.add(textoBold);
parrafo.add(textoRoman);
parrafo.add(textoSize);
parrafo.add(textoColor);
parrafo.add(textoFuenteExterna);
parrafo.add(textoTodo);
document.add(parrafo);
}
} catch (FileNotFoundException ex) {
LOGGER.log(Level.SEVERE, null, ex);
} catch (IOException ex) {
LOGGER.log(Level.SEVERE, null, ex);
}
}
}
Tras ejecutar el programa vera el archivo fuentes.pdf que se ve asi.
Varias fuentes
Puede encontrar el proyecto de ejemplo aquí: https://github.com/HashRaygoza/fuentesitext
Espero que esta entrada les fuera de utilidad, nos vemos en la próxima y si desean cooperar con la causa.
## Referencias:
https://stackoverflow.com/questions/56853541/what-are-the-new-constants-for-the-pdffontfactory-class-in-itext
https://itextpdf.com/en/resources/books/itext-7-building-blocks/chapter-1-introducing-fonts
Fuentes en iText 7 – #Raydamon
https://hashraydamon.blog/2020/03/06/fuentes-en-itext-7/
#java #coding #programming #iText
07.08.2025 04:48 — 👍 1 🔁 1 💬 0 📌 0
#android #androidev #java
07.08.2025 03:39 — 👍 1 🔁 1 💬 0 📌 0
I had a really great time at Spring I/O ☀️ This is the recording of my presentation about Modular RAG Architectures, where I cover several RAG patterns that you can implement in your Spring Boot application using Spring AI + Arconia (for enhanced developer experience).
#Java #AI #SpringBoot
06.08.2025 20:35 — 👍 2 🔁 2 💬 0 📌 0
📍Karimunjawa, Central Java, Indonesia..
#karimunjawa #java #indonesia #streetart #wackywednesdayart #photography
06.08.2025 19:18 — 👍 11 🔁 1 💬 1 📌 0
📍Karimunjawa, Central Java, Indonesia..
#karimunjawa #java #indonesia #rooster #streetart #wackywednesdayart #photography
06.08.2025 19:20 — 👍 12 🔁 1 💬 1 📌 0
Try using this foldi when you teach #classes this year! Print it back to back. Fold it on the vertical line and cut flaps along the horizontal lines. This will allow them to lift each flap for a definition and example.
Learn more: learn.java/learning/tut...
#Java #learnjava #teachjava #introtoCS
06.08.2025 19:12 — 👍 1 🔁 1 💬 0 📌 0
📢 Super exciting news! Two talks on #TornadoVM, one of the technologies used and extended in our project will be part of the #DevoxxBE program in October!
Congratulations to the #TornadoVM team from the University of Manchester! 👏
Registration will open soon!
#opensource #Java #GPU
06.08.2025 18:24 — 👍 6 🔁 2 💬 0 📌 0
A deep dive talk about #TornadoVM, an #opensource #Java technology for hardware acceleration will be part of the @devoxx.com program! #DevoxxBE
Join us to learn more about the technology!
And do not miss, a 2nd talk on how TornadoVM can offer GPU-accelerated inference in Java! 🚀
06.08.2025 18:13 — 👍 8 🔁 3 💬 0 📌 0
https://youtu.be/UKYDkTRgNpI
youtu.be
Our next #JCON2025 session is live: 'Virtual #Threads Structured #Concurrency Extent Locals: When to Use Them, and How.' with Cay Horstmann
Project #Loom introduces a #lightweight threading model to the #Java platform. …
Grab your coffee and hit play: youtu.be/UKYDkTRgNpI
#JCON
06.08.2025 16:05 — 👍 1 🔁 1 💬 0 📌 0
The latest live coding session was... something else.
AI logic, function calls, broken ASCII art.
🎥 Catch the next session here: youtube.com/live/jbnWaC0...
#LiveCoding #Java #AI #OpenSource
06.08.2025 15:18 — 👍 4 🔁 2 💬 0 📌 0
YouTube video by CountMosquitoMC
Secret Laboratory | Rotten Block S1E25
Forgot to post this yesterday! Hope you enjoy. 🤗
@niaamo.bsky.social
#minecraft #java #smp
www.youtube.com/watch?v=8nT6...
06.08.2025 14:21 — 👍 1 🔁 2 💬 0 📌 0
Para os que não sabem, o maven está indo para sua versão 4(ainda sem data de lançamento). Com o lançamento do @intellijidea.com 2025.2 dando suporte ao Maven4, resolvi experimentar essa versão, por comentarem ganhos de performance. Testei e ainda não vi ganhos consideráveis assim.
#java #bolhadev
06.08.2025 14:01 — 👍 5 🔁 3 💬 0 📌 0
Origin
Web Crawler Using WebMagic Explore WebMagic, its architecture, and setup details. The post Web Crawler Using WebMagic first appeared on Baeldung .
Interest | Match | Feed
06.08.2025 12:43 — 👍 1 🔁 1 💬 0 📌 0
Unlock your #achievement: #JCONUSA25 at #IBM #TechXchange! 🏆
Join us in Orlando (Oct 6–9) for fantastic #Java talks, #legendary speakers, and serious networking XP. Grab your gear, it's going to be epic.
🕹️ usa.jcon.one/register
#JCON #JCON2025
06.08.2025 12:23 — 👍 1 🔁 1 💬 0 📌 0
Here's your daily #apcsa quiz #2. There is a new focus on algorithms in the course and exam description. Hope this helps.
Learn more: learn.java/learning/tut...
#learnjava #teachjava #javaprogramming #Java #dailyquiz #algorithms
06.08.2025 12:06 — 👍 1 🔁 1 💬 0 📌 0
YouTube video by Coffee + Software
IntelliJ IDEA 2025.2 and Spring Modulith
IntelliJ IDEA 2025.2 and Spring Modulith
youtu.be/fGExm_Rlees?...
#java #spring
06.08.2025 12:10 — 👍 2 🔁 2 💬 0 📌 0
Super excited to give a deep dive talk on @devoxx.com 2025!
We will give a deep dive presentation on the internals of @tornadovm.org and explain how #Java developers can harness the power of #GPUs!
See you all in Belgium at fall!
06.08.2025 10:07 — 👍 8 🔁 3 💬 0 📌 2
We are leading the serverless revolution, the most innovative tech stack powering businesses around the world.
https://substack.com/@fauxfiruta?utm_source=user-menu
Expert software and AI architect, old geek, all about coding and also game engines
Java Champion,
JUG Leader JUG Bodensee, JTaccuino
Apache NetBeans PMC, OpenJFX author,
Systemengineer @ Airbus Defence and Space
Living, breathing Oracle Security; Oracle ACE on security; OAK table member. Database security audits, consulting and training on all aspects of Oracle security - http://www.petefinnigan.com/training/oracle_security_training_in_york_2025.htm
Codage artistique et jeux de mots
remy.mouton.free.fr
http, pas https - il faut cliquer "j'accepte les risques, je veux voir quand même" - le risque c'est d'y passer une heure paske c'est joli.
#creativecoding #codeart #genartclub
Owns https://techmash.co.uk The world is a wonderful place lets take a look at it together! Are you ready? #Londoner #London #Arsenal #Suffolk #Techmash
🏳️🌈 Artist / developer. He / him. Ask me about my Pokémon / Paper Mario fan game project!
I'm a tech guy based in Berlin, rooted most firmly in the Java and Android worlds, but with varied interests and experiences beyond that. Mac user. Find out more […]
🌉 bridged from https://troet.cafe/@udittmer on the fediverse by https://fed.brid.gy/
Software Engineering | Artificial Intelligence | Cybersecurity | Quantum Computing | Homeland Security | Aviation | Linguistics | Sociology
A cozy space to celebrate islands and not only them.
https://www.islandsaround.com
OpenJDK hacker at SapMachine, works on hello-ebpf for fun