Releases: AutoComplete1/jPowerShell2
Releases · AutoComplete1/jPowerShell2
Release v1.1.0 - The Modernization Update 🚀
I am excited to announce the first major release of jPowerShell2! This version is a complete overhaul of the original library, focused on performance, modern Java standards, and cross-platform flexibility.
🌟 What's New?
- Java 21 Support: We now utilize Virtual Threads (Project Loom) for I/O handling. This makes sessions extremely lightweight and allows for high-concurrency without thread exhaustion.
- Zero-Delay I/O: Optimized the CommandProcessor to eliminate artificial wait times (waitPause). The library now reacts instantly as soon as PowerShell provides output.
🌐 PowerShell Core (pwsh) Integration
- Full support for PowerShell Core (7+).
- New
openSession(boolean useCore) method to easily targetpwshon Windows, Linux, and macOS. - Improved UTF-8 handling for cross-platform consistency.
🔄 Asynchronous API
Added executeCommandAsync(String command), returning a CompletableFuture. Run your PowerShell tasks in the background without blocking your main application logic.
🛠 Improvements & Refactoring
- Efficient Script Execution: Used
transferTofor faster script loading from JAR resources. - Regex-free Trimming: Improved string processing performance by replacing heavy Regex with manual whitespace trimming.
⚠️ Important Note on Requirements
This release requires Java 21 or higher to take advantage of Virtual Threads and modern I/O features.
💻 Quick Start
try (PowerShell ps = PowerShell.openSession(true)) { // true = Use PowerShell Core
var response = ps.executeCommand("Get-Date");
System.out.println(response.getCommandOutput());
}jPowerShell2 v1.0.3
👉🏻 Fix
- optimized cpu performance
jPowerShell2 v1.0.2
👉🏻 Features
- optimized performance
- replaced deprecated api usage in tests
jPowerShell2 v1.0.1
- fixed executeCommandAndChain method