Skip to content

Releases: AutoComplete1/jPowerShell2

Release v1.1.0 - The Modernization Update 🚀

06 Jan 21:45

Choose a tag to compare

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 target pwsh on 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 transferTo for 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

28 Oct 19:13
b621567

Choose a tag to compare

👉🏻 Fix

  • optimized cpu performance

jPowerShell2 v1.0.2

22 Oct 17:11
1158940

Choose a tag to compare

👉🏻 Features

  • optimized performance
  • replaced deprecated api usage in tests

jPowerShell2 v1.0.1

22 Oct 12:29
e7d36b3

Choose a tag to compare

  • fixed executeCommandAndChain method