r/JavaProgramming • u/CutGroundbreaking305 • 55m ago
Java based Numerical library (JNum-v0.2) This time even better and faster!
Guys give your options on the project please 😊
r/JavaProgramming • u/CutGroundbreaking305 • 55m ago
Guys give your options on the project please 😊
r/JavaProgramming • u/FrankCodeWriter • 1h ago
r/JavaProgramming • u/SteF44444 • 2h ago
Arcana is an open-source Java library and command-line tool that lists, extracts and identifies more than 40 archive, compression and disk image formats, with no native code and no dependencies. It runs on Java 8 or later, fits in a 1.2 MB JAR, and is published on Maven Central as io.github.realburst:arcana under the Apache 2.0 licence.
If you have ever had to open "whatever the user uploads" from a Java application, you know the drill. ZIP is in the JDK. Apache Commons Compress covers TAR, 7z, CPIO, AR and the common compressors, but some codecs need extra libraries, and Zstandard goes through a JNI binding. RAR needs another library, and RAR 5 support is hard to find in pure Java. For CAB, MSI, ISO, WIM or an installer .exe, the usual answer is to bundle 7-Zip through native bindings, with one binary per OS and CPU.
I wanted one JAR that does all of this, on any JVM, with nothing to install and nothing native to load. That is Arcana: one entry point, format detection by content rather than by file extension, and the same API whether the file is a .tar.zst, a RAR 5 volume set, an MSI package or a macOS .dmg.
Arcana extracts every format it supports, and creates the most common ones.
| Family | Formats | Create |
|---|---|---|
| Archives | ZIP (ZipCrypto, WinZip AES, Deflate64, Zip64), 7z, RAR 4 and RAR 5 (solid, volumes, encrypted headers), TAR, CPIO, AR / DEB, RPM, XAR, ARJ, LHA | ZIP, 7z, TAR, LHA |
| Compressors | GZIP, BZIP2, XZ, LZMA, Zstandard, LZ4, Brotli, Snappy, lzip, lzop, Unix .Z, MS SZDD |
GZIP, BZIP2, XZ, TAR + gz / bz2 / xz / lz4 |
| Windows | CAB (MSZIP, LZX), MSI (real installed file tree), OLE compound files, CHM, WIM / ESD (XPRESS, LZX, LZMS), self-extracting .exe |
CAB |
| Disk images | ISO 9660 (Joliet, Rock Ridge), UDF, SquashFS, Apple DMG with HFS+ | - |
Encrypted archives are supported: AES-256 for ZIP and 7z (reading and writing), AES-128 and AES-256 for RAR 4 and RAR 5. A TAR or CPIO inside any compressor is unpacked in one step, and files that are archives in disguise (.docx, .odt, .epub, .apk, .jar) open like any other archive.
Beyond extraction, Arcana can:
Add the dependency:
<dependency>
<groupId>io.github.realburst</groupId>
<artifactId>arcana</artifactId>
<version>1.0.8</version>
</dependency>
Extracting and listing never require you to say what the file is: the format is detected from its content.
import be.stef.arcana.Arcana;
import be.stef.arcana.ArcanaEntry;
import be.stef.arcana.analyze.Identification;
// Extract anything: .zip, .rar, .7z, .tar.zst, .msi, .iso, .dmg...
Arcana.extractTo(new File("upload.bin"), new File("out"));
// List the entries without extracting
for (ArcanaEntry e : Arcana.listEntries(new File("backup.rar"))) {
System.out.println(e.getName() + " " + e.getUncompressedSize());
}
// Encrypted archive
Arcana.withPassword("secret".getBytes("UTF-8")).extract(new File("secure.7z"), new File("out"));
// What is this file?
Identification id = Arcana.identify(new File("mystery.bin"));
System.out.println(id.type + " - " + id.description);
Creating an archive is just as short:
import be.stef.arcana.ArcanaFormat;
import be.stef.arcana.compressor.ZipCompressor;
import be.stef.arcana.plugin.FormatRegistry;
byte[] password = "secret".getBytes("UTF-8");
new ZipCompressor(password).compress(new File("mydir"), new File("secure.zip")); // WinZip AES-256
FormatRegistry.builtin(ArcanaFormat.SEVEN_Z).createCompressor(9, password).compress(new File("mydir"), new File("vault.7z"));
The same JAR is also a command-line tool:
java -jar Arcana-v1.0.8.jar x setup.exe -o out # extract
java -jar Arcana-v1.0.8.jar l disk.dmg # list
java -jar Arcana-v1.0.8.jar i mystery.bin # identify
java -jar Arcana-v1.0.8.jar r damaged.zip -o rescue # recover
On Windows, an optional script adds "Arcana Unpack / List / Info" to the Explorer right-click menu.
An archive extractor reads untrusted input by definition, so Arcana treats every file as hostile.
.., no characters that Windows forbids. A "zip slip" entry cannot leave the destination folder.ExtractionLimits): an output/input ratio of 1000 once 1 GiB has been written, an optional total size, and a minimum of 256 MiB of free disk space.zstd tool, and the 7z key derivation to 224 rounds. A crafted header gets an error, not an OutOfMemoryError.Every decoder is written in Java: Deflate64, LZMA and LZMA2, PPMd, Zstandard, Brotli, LZ4, LZX, LZMS, XPRESS, LZFSE and LZVN, ADC, LZO1X, the RAR 4 and RAR 5 algorithms, AES and the key derivations. The core is about 80,000 lines of Java 8 and has no dependency outside the JDK. It is written from the public specifications: PKWARE APPNOTE, the 7-Zip format notes, the Microsoft open specifications (MS-CAB, LZX, MS-XCA), RFC 8878 for Zstandard, RFC 7932 for Brotli, Apple TN1150 for HFS+.
A few design choices shape the library:
InputStream with bounded buffers. The Zstandard decoder keeps only the window of the current frame, so a multi-gigabyte .tar.zst decodes in a few dozen MB of heap.File and Directory tables, not as a cabinet of cryptic keys.Each release goes through a regression suite. About 180 small samples are committed with the code: one per format and method, plus damaged files that must fail cleanly, never hang. A separate corpus of real-world files (installers, DMG images from GitHub releases, MSI packages) is checked against committed SHA-256 references. Every format also has a technical page in the repository, covering detection, layout, supported methods, limits and the sources used.
Arcana is a young project, and the repository keeps a public list of known issues for every format. Before you rely on it, the main limits are:
.swm) and some rare compression methods (old LHA methods, Quantum in CAB) are not supported.zstd library.If a file fails, an issue with the command line and, when possible, the file or a way to rebuild it, is the fastest route to a fix.
The quickest test is to point Arcana at the strangest file in your Downloads folder and run arcana i on it, then arcana x. If you maintain a Java application that receives archives from users, try replacing a native binding or a chain of libraries with one dependency, and tell me what breaks.
io.github.realburst:arcanaIssues, sample files that fail, and plugins are all welcome. And if Arcana saves you a dependency or a native binary, a star on GitHub helps other Java developers find it.
r/JavaProgramming • u/taras_bulba • 7h ago
I’m working on Pmitz, short for Plans and Limits. It handles which features a subscription includes, how much someone can use them, and recording that usage.
The idea is to avoid scattering subscription checks throughout your app and having to revisit them whenever your plans change. For example, a customer’s plan might include a feature with a monthly allowance. Pmitz can check feature access and the usage limit together.
You can embed it directly in a Java application or run it as a separate REST service. Embedding avoids the HTTP call, although there’s still database work. The separate service lets multiple apps share the same plans and usage data.
We also offer a managed version where we handle hosting and maintenance, but the open-source code is here:
https://github.com/terpomo-io/pmitz
I’d be interested in feedback on the Java integration and what’s missing for your use case.
r/JavaProgramming • u/benevanstech • 7h ago
r/JavaProgramming • u/madeincoding • 10h ago
I need java support offline in Hyderabad.Can anyone giving please dm me...
r/JavaProgramming • u/javinpaul • 23h ago
r/JavaProgramming • u/correctMeIfImcorrect • 21h ago
Hey everyone,
I made a video for anyone who uses Spring Data JPA but still isn't sure what JPA, Hibernate and JDBC each do, or how they differ.
It's visually explained . It follows one save() call from a Spring Boot app down to the database, so you can see what happens behind the hood and where Hibernate comes from. It's about 11 minutes.
Hope it helps someone, and tell me if anything is unclear.
r/JavaProgramming • u/Known_Commercial_790 • 20h ago
r/JavaProgramming • u/Some-Bunch7607 • 1d ago
I was recently laid off from Java Developer role of 5 years. Been weighing my options and found some bootcamps that are promising job opportunities upon the program completion. These programs include front-end simplified and algomap.io.
I have my reservations about these kind of bootcamps because I can never tell if they are scams or not. Also, it is a very significant financial investment.
Does anyone have any experience with these specific bootcamps or if there any others like them that have worked for anyone?
Also if you can provide any advice on alternatives to help me get back on my feet, then that would be greatly appreciated.
r/JavaProgramming • u/ClickOk5811 • 1d ago
Here’s the console output of a small program:
filter apple
map apple
That’s all. Four strings went in, and only the first one was ever looked at. Here’s the code:
String result = Stream.of("apple", "banana", "cherry", "date")
.filter(s -> { System.out.println("filter " + s); return s.length() > 4; })
.map(s -> { System.out.println("map " + s); return s.toUpperCase(); })
.findFirst()
.orElse("none");
result is "APPLE".
Two things explain the output.
Intermediate operations don’t run on their own. filter and map only describe what should happen. Nothing executes until a terminal operation like findFirst, collect or forEach asks for elements. If you remove .findFirst().orElse("none") and leave the pipeline hanging, it prints nothing at all.
Elements flow through one at a time. Instead of running filter over all four strings, then map over the survivors, each element goes through the whole chain before the next one starts. apple passes the filter, gets mapped, and arrives at findFirst, which has what it needs, so the pipeline stops. banana, cherry and date are never touched.
That’s why peek and print statements inside a pipeline can look confusing: the order of the output isn’t “all the filters, then all the maps”.
One exception worth knowing: stateful operations like sorted() have to see every element before they can emit the first one, so they break the one-at-a-time flow. A pipeline with sorted() in the middle will process everything up to that point before anything continues.
A practical consequence is that side effects inside map or filter are hard to reason about, because whether and when they run depends on what’s downstream. I’d keep those lambdas free of side effects and use peek only for debugging.
If you’ve hit a bug that came down to laziness, I’d be interested in what it looked like. Mine tend to be the “I added a map and nothing happened” kind.
r/JavaProgramming • u/Nawr-Tilt • 1d ago
In the projects I work on, business requirements change a lot. A validation rule gets added for one customer, a check has to be switched off for a while, a new step slots in between two existing ones. Over time the service methods that implement these flows turn into long chains of ifs and flags, and every change means touching code that's already working.
To deal with this I started modelling each business operation as a pipeline of small, named steps that share a typed context. I've extracted the approach into a small library, and I'd like some outside opinions on the design before going further.
Pipeline<CreateProductContext> createProduct = Pipeline.<CreateProductContext>builder("create-product")
.step("name-unique", new NameUniqueStep(repository))
.step("date-range", new DateRangeStep())
.step("save-product", new SaveProductStep(repository))
.build();
Product product = createProduct.run(new CreateProductContext(request)).getSavedProduct();
How it works:
pipeline.disabled-steps) without changing code. Steps that must never be skipped are declared with requiredStep(...), and the starter refuses to start if the configuration tries to disable one.Business errors carry a stable code and a category. Unexpected exceptions are wrapped with the pipeline and step where they happened. The Spring Boot starter maps both to ProblemDetail responses.
Some design choices I'm not fully sure about:
"Required" is a builder method, not an annotation on the step class. Step is a functional interface, so lambdas can't be annotated, and the same step can be required in one pipeline and optional in another.
Disabling by name, via configuration. It's convenient, but I wonder whether it pushes too much business logic into config files.
A shared mutable context instead of each step returning a new immutable value. It's simpler to write, but the data flow between steps is less explicit.
Core is Java 17 with no runtime dependencies. There's also a Spring Boot 4.1 starter. It's version 0.1.0 on Maven Central, and code be found on GitHub: https://github.com/DifferenTilt/pipeline
The feedback I'd find most useful:
Thanks for reading. Criticism is welcome.
r/JavaProgramming • u/Ok_Head_1329 • 1d ago
Hi everyone,
I'm currently pursuing my MCA and preparing for Java Backend Development roles. I've been applying for internships and fresher jobs through platforms like Naukri and Internshala, but I'm not getting many responses or useful email updates.
I'm looking for genuine platforms where freshers can find Java Developer internships and entry-level software development jobs.
I'd appreciate your suggestions on the following:
I'm open to opportunities in Pune, other cities, and remote positions.
I'm not looking for paid placement services or platforms that promise guaranteed jobs. I want genuine opportunities where I can improve my skills, gain practical experience, and start my software development career.
Please share your personal experiences and recommend platforms that have actually worked for you.
Thanks in advance!
r/JavaProgramming • u/Late-Duty5234 • 1d ago
r/JavaProgramming • u/robintegg • 2d ago
Hey r/java,
TeaVM was something that had been on my radar for a while, and I finally got around to giving it a proper spin recently. After playing around with it and seeing what I can build with it I wanted to share my thoughts and hopefully get a few more eyes on the project!
If you haven’t run into it before, TeaVM is an ahead-of-time compiler that turns Java bytecode into JavaScript or WebAssembly. It operates directly at the bytecode level, emits remarkably clean JS, and integrates with your existing Java tooling.
To document what I learned, I put together a 3-part series walking through how to build interactive frontends with TeaVM:
Has anyone else here given TeaVM a try? Would love to hear how your experience compares to other JVM web approaches!
r/JavaProgramming • u/javinpaul • 3d ago
r/JavaProgramming • u/Gui_Malves • 2d ago
I need help where and how study Jakarta Faces, PrimeFaces
r/JavaProgramming • u/hugo121319_mc • 3d ago
According to my terminal javac only works until java 52.0 but my code is in java version 70.0(java 26)how do i fix
r/JavaProgramming • u/Old-Pilot-3474 • 2d ago
I'm rebuilding a legacy Java CLI library app into a peer-to-peer library platform (Java 21 / Spring Boot), where members catalog their own collections and lend copies to each other.
When I added ownership, the fastest path was to reuse my existing Borrower entity as the owner. I didn't. I created a separate LibraryMember entity instead, because in this system they do different jobs:
Collapsing them would have saved me an entity this week and cost me a tangled model every week after.
Each copy also carries visibility: PRIVATE (default, owner only, can't be borrowed) or PUBLIC (discoverable + borrowable), and my discovery query only returns available PUBLIC copies.
Curious how others have modeled this: in a sharing/lending platform, where did you draw the line between "user of the platform" and "person the user lends to"?
(Code, if useful: github.com/Pekins1/LibraryManagementSystem)
r/JavaProgramming • u/Hot_Technology8777 • 3d ago
I program in C but I've been taking a liking to java games recently. I just wanted to ask, what is developing games on Java truly like? Is there a difference say between early 2000s to now? Stupid question I'm sure, but I've never really dabbled in Java
r/JavaProgramming • u/codeandcrypto_ • 3d ago
r/JavaProgramming • u/Tony_salinas04 • 4d ago
r/JavaProgramming • u/javinpaul • 4d ago