mirror of
https://github.com/apple/pkl.git
synced 2026-03-24 10:01:10 +01:00
Support jpkl executable for Windows (#872)
This updates the script used to start the executable to support Windows as well. For Windows support, the executable needs to be named `jpkl.bat`.
This commit is contained in:
@@ -53,8 +53,7 @@ whereas, the Alpine Linux executable is statically linked against _musl libc_ an
|
||||
====
|
||||
|
||||
The Java executable works on multiple platforms and has a smaller binary size than the native executables.
|
||||
However, it requires a Java 17 (or higher) runtime on the system path, has a noticeable startup delay,
|
||||
and runs complex Pkl code slower than the native executables.
|
||||
However, it requires a Java 17 (or higher) runtime on the system path, and has a noticeable startup delay.
|
||||
|
||||
All flavors are built from the same codebase and undergo the same automated testing.
|
||||
Except where noted otherwise, the rest of this page discusses the native executables.
|
||||
@@ -201,6 +200,14 @@ NOTE: We currently do not support the aarch64 architecture for Windows.
|
||||
[[java-executable]]
|
||||
=== Java Executable
|
||||
|
||||
The Java executable is a jar that can be executed directly on macOS, Linux, and Windows.
|
||||
|
||||
It requires `java` to be installed, and available on `$PATH`.
|
||||
|
||||
[tabs]
|
||||
====
|
||||
macOS/Linux::
|
||||
+
|
||||
[source,shell]
|
||||
[subs="+attributes"]
|
||||
----
|
||||
@@ -209,6 +216,16 @@ chmod +x jpkl
|
||||
./jpkl --version
|
||||
----
|
||||
|
||||
Windows::
|
||||
+
|
||||
[source,PowerShell]
|
||||
[subs="+attributes"]
|
||||
----
|
||||
Invoke-WebRequest '{uri-pkl-java-download}' -OutFile jpkl.bat
|
||||
.\jpkl --version
|
||||
----
|
||||
====
|
||||
|
||||
This should print something similar to:
|
||||
|
||||
[source,shell]
|
||||
@@ -217,8 +234,7 @@ This should print something similar to:
|
||||
Pkl {pkl-version} (macOS 14.2, Java 17.0.10)
|
||||
----
|
||||
|
||||
NOTE: The Java executable does not work as an executable file on Windows.
|
||||
However, it will work as a jar, for example, with `java -jar jpkl`.
|
||||
NOTE: The Java executable is named `jpkl`.
|
||||
|
||||
[[usage]]
|
||||
== Usage
|
||||
@@ -721,8 +737,6 @@ Type :help or :examples for more information.
|
||||
pkl>
|
||||
----
|
||||
|
||||
NOTE: The Java executable is named `jpkl`.
|
||||
|
||||
=== Loading Modules
|
||||
|
||||
To load <<config.pkl,`config.pkl`>> into the REPL, run:
|
||||
|
||||
Reference in New Issue
Block a user