Skip to content

Commit b38fe96

Browse files
committed
Apply default value
1 parent 3b10516 commit b38fe96

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Core/JVM/Parameters/Runtime.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
final class Runtime
55
{
6+
const ENTRYPOINT = null;
7+
68
const MAX_STACK_EXCEEDED = 9999;
79
const STRICT = true;
810

src/Core/JavaArchive.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
namespace PHPJava\Core;
33

4+
use PHPJava\Core\JVM\Parameters\Runtime;
45
use PHPJava\Exceptions\UndefinedEntrypointException;
56
use PHPJava\Imitation\java\io\FileNotFoundException;
67
use PHPJava\Imitation\java\lang\ClassNotFoundException;
@@ -35,7 +36,7 @@ public function __construct(string $jarFile, array $options = [])
3536
$this->expandedHArchive = $archive;
3637
$this->options = $options;
3738

38-
$this->manifestData['main-class'] = $options['entrypoint'] ?? null;
39+
$this->manifestData['main-class'] = $options['entrypoint'] ?? Runtime::ENTRYPOINT;
3940

4041
// Add resolving path
4142
ClassResolver::add(

0 commit comments

Comments
 (0)