dro1dDev's Java Library
dro1d-libs-java
A collection of reusable Java libraries to simplify application development.
Features
- Command Management: Simplify the creation and execution of CLI arguments.
- I/O Utilities: Streamline input/output operations with easily reusable implementations.
- Localization: Manage, create, and use locales with ease.
- Extensibility: Modular design for easy integration into projects.
Getting Started
Dependencies:
- Java 21+
org.json:json:20240303
(required forLocaleManager
)com.formdev:flatlaf:3.4
(required for Swing GUI components)
Test Dependencies
org.junit.jupiter:junit-jupiter:5.12.1
Installation
Add the JAR file as a dependency in your project. If you use
LocaleManager
, you will also need to add the org.json library.
If you use the Swing GUI features, add the flatlaf library.
No release JAR is provided due to frequent updates. Clone the repository and build from source. You will need Java 21+ and the dependencies above. Use the provided IntelliJ build chain:
- Windows:
W7: Create Artifacts
(PowerShell) - Unix/Mac/Linux:
7: Create Artifacts
Note: When generating Javadocs, there should be 176 warnings (from private locale fields lacking comments). If this number changes, check your Javadoc comments.
Documentation
For detailed documentation on classes and methods, refer to the Javadocs (this site).
Examples
Command Management
CommandManager commandManager = new CommandManager();
commandManager.registerCommand(
"example", new ExampleCommand()
);
commandManager.executeCommand("example");
Localization
LocaleManager localeManager = new LocaleManager(
Main.class, "dro1dDev"
);
localeManager.loadLocaleFromFile("eng");
String message = localeManager.getVariableInComponent(
"MainWindow", "greetingLabel", "messageText"
);
System.out.println(message);
Support
For issues or questions, open an issue or contact the developer.