-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjperl.bat
More file actions
executable file
·22 lines (18 loc) · 1.06 KB
/
jperl.bat
File metadata and controls
executable file
·22 lines (18 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@echo off
rem PerlOnJava Launcher Script for Windows
rem This script launches the PerlOnJava runtime environment, which provides
rem a Java-based implementation of the Perl programming language.
rem Repository: github.com/fglock/PerlOnJava
rem Get the directory where this script is located
set SCRIPT_DIR=%~dp0
rem Get the full path to this script to set $^X correctly
set JPERL_PATH=%~f0
rem Set environment variable for PerlOnJava to use as $^X
set PERLONJAVA_EXECUTABLE=%JPERL_PATH%
rem Launch Java
rem JVM options explained:
rem --enable-native-access=ALL-UNNAMED: Required by JNR-POSIX library for native system calls
rem (file operations, process management). Can be removed if JNR-POSIX is replaced.
rem --sun-misc-unsafe-memory-access=allow: Suppresses deprecation warnings from JFFI library
rem (used by JNR). Can be removed when JFFI updates to use MemorySegment API (Java 22+).
java --enable-native-access=ALL-UNNAMED --sun-misc-unsafe-memory-access=allow %JPERL_OPTS% -cp "%CLASSPATH%;%SCRIPT_DIR%target\perlonjava-3.0.0.jar" org.perlonjava.app.cli.Main %*