Skip to content

Tag: java-16

Eclipse not able to see javax package

I’m currently trying to fiddle with images, specifically convert images from JPEG, WEBP, and BMP forms to PNG forms and my method uses the javax.imageio.ImageIO class. When I tried importing it, Eclipse yelled that the package that the type was not accessible. I thought that was weird and went digging t…

How do I create a jar file via the command line?

Lets say I have these .java files: MainClass.java 2ndClass.java BarClass.java FooClass.java Then I turn them into .class files: MainClass.class 2ndClass.class BarClass.class FooClass.class How would I make it a jar file, and have MainClass.class be the first to be loaded? Answer Observing what Elliott said ab…

How to provide JAXB dependency via Gradle package?

TLDR: Which packages (and with which scopes) does one has to include for: using JAXB in a library using XJC in a library running tests in that library include the library as a dependency into another library without having JAXB related runtime errors Details: I’m working with JAXB and XJC with JDK 16 an…

Install Java 16 on Raspberry Pi 4

I have tried multiple releases from here using : But after java -version I always get: Which means I have chosen the wrong release/architecture. Is there a release that works with Raspberry Pi’s or is there another way to install Java 16? Answer Answering my own question. cd [minecraft directory here] w…

How to use @ConfigurationProperties with Records?

Java 16 introduced Records, which help to reduce boilerplate code when writing classes that carry immutable data. When I try to use a Record as @ConfigurationProperties bean as follows I get the following error message: How can I use Records as @ConfigurationProperties? Answer Answering my own question. The a…