![](https://csdnimg.cn/release/download_crawler_static/10344525/bg10.jpg)
■ Contents
xv
Packaging the JKScript Files ��������������������������������������������������������������������������������������������������������������716
Using the JKScript Script Engine �������������������������������������������������������������������������������������������������������� 717
The jrunscript Command-Line Shell ����������������������������������������������������������������������������� 719
The Syntax ������������������������������������������������������������������������������������������������������������������������������������������ 719
Execution Modes of the Shell ������������������������������������������������������������������������������������������������������������� 721
Listing Available Script Engines ����������������������������������������������������������������������������������������������������������722
Adding a Script Engine to the Shell ���������������������������������������������������������������������������������������������������� 722
Using Other Script Engines ����������������������������������������������������������������������������������������������������������������� 723
Passing Arguments to Scripts������������������������������������������������������������������������������������������������������������� 723
The jjs Command-Line Tool ������������������������������������������������������������������������������������������ 724
JavaFX in Nashorn ������������������������������������������������������������������������������������������������������� 729
Summary ���������������������������������������������������������������������������������������������������������������������� 732
■Chapter 10: Process API ������������������������������������������������������������������������������������ 735
What Is the Process API? ���������������������������������������������������������������������������������������������� 735
Knowing the Runtime Environment ������������������������������������������������������������������������������ 737
The Current Process ����������������������������������������������������������������������������������������������������� 738
Querying Process State ������������������������������������������������������������������������������������������������ 739
Comparing Processes��������������������������������������������������������������������������������������������������� 742
Creating a Process ������������������������������������������������������������������������������������������������������� 743
Obtaining a Process Handle ����������������������������������������������������������������������������������������� 755
Terminating Processes ������������������������������������������������������������������������������������������������� 757
Managing Process Permissions ����������������������������������������������������������������������������������� 758
Summary ���������������������������������������������������������������������������������������������������������������������� 760
■Chapter 11: Packaging Modules ������������������������������������������������������������������������ 763
The JAR Format ������������������������������������������������������������������������������������������������������������ 763
What Is a Multi-Release JAR? ������������������������������������������������������������������������������������������������������������ 764
Creating Multi-Release JARs �������������������������������������������������������������������������������������������������������������� 765
Rules for Multi-Release JARs ������������������������������������������������������������������������������������������������������������� 771
Multi-Release JARs and JAR URL ������������������������������������������������������������������������������������������������������� 773
Multi-Release Manifest Attribute �������������������������������������������������������������������������������������������������������� 773