Skip to content

Commit 3b10516

Browse files
committed
Add entrypoint
1 parent 3841d2d commit 3b10516

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ $javaClass = new JavaClass(
273273

274274
|Options | Value | Default | Description |Targeted |
275275
|:-------------:|:-------------:|:-------------:|:-------------:|:-------------:|
276+
| entrypoint | ?string | null | Specify to run entrypoint in JAR. | JavaArchive |
276277
| max_stack_exceeded | integer | 9999 | Execute more than the specified number of times be stopped the operation. | JavaClass |
277278
| strict | boolean | true | If strict mode is `true` then execute method, variables and so on with strict. But if strict mode is `false` then execute ambiguously method, variable and etc in PHPJava. | Both |
278279
| validation.method.arguments_count_only | boolean | false | If this mode `true` then ClassResolver validate arguments size only. | JavaClass |

src/Core/JavaArchive.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public function __construct(string $jarFile, array $options = [])
3535
$this->expandedHArchive = $archive;
3636
$this->options = $options;
3737

38+
$this->manifestData['main-class'] = $options['entrypoint'] ?? null;
39+
3840
// Add resolving path
3941
ClassResolver::add(
4042
[

0 commit comments

Comments
 (0)