A collection of Java utilities for interacting with Windows via native DLLs.
- Native interactions: Direct access to Windows API via Java wrappers
- Input control: Precise mouse manipulation (clicks, cursor positioning)
- System notifications: Windows toast notifications delivery
- Console operations: Color-formatted output
- System operations: Shutdown/reboot + low-level functions
- Static API: Utility classes with instantiation prevention
- Native integration: Optimized pre-built DLL components
// Left click
WinMouse.leftClick();
// Right click
WinMouse.rightClick();
// Set cursor position (X, Y)
WinMouse.setCursorPosition(100, 200);
// Get current position
Position pos = WinMouse.getCursorPosition();
// Send notification
WinNotifications.send("Message text", "Title");
// System shutdown
WinSystem.shutdown();
// System reboot
WinSystem.reboot();
// Trigger BSoD
// Dangerous operation, use with caution!
// Requires enabling via WinTools.setDangerOpsEnabled(true)
try {
WinSystem.bsod();
} catch (SecurityException e) {
// Throws if dangerous operations are disabled
}
// Basic output
WinTerminal.write("Text without newline");
WinTerminal.writeLine("Text with newline");
// Colored output
WinTerminal.write("Red text", Colors.RED);
WinTerminal.writeLine("Blue text", Colors.BLUE);
// Reset color
WinTerminal.resetColor();
// Set persistent color
WinTerminal.setColor(Colors.GREEN);
// OS check
if (WinTools.isWindows()) {
// Windows-specific logic
}
// Enable/disable dangerous operations
WinTools.setDangerOpsEnabled(false);
// Check dangerous operations status
boolean enabled = WinTools.isDangerOpsEnabled();
- Add the JitPack repository to your
pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
- Add the dependency
<dependency>
<groupId>com.github.KvaytG</groupId>
<artifactId>win-tools</artifactId>
<version>-SNAPSHOT</version>
</dependency>
Optional: To use a specific version, tag a release and replace -SNAPSHOT
with the tag name.
- Performance has been tested only on Windows 10 and Windows 11.
- Administrator privileges are NOT required.
- Dangerous operations are disabled by default and require explicit activation.
Functions marked with @Dangerous
, intended only for:
- Security research
- System stability testing
- Educational purposes
Special thanks to adasdead for developing the native DLL components that made this project possible.
Licensed under the MIT license.
This project uses open-source components. For license details see pom.xml and dependencies' official websites.