Skip to content

JavaArchive

memory-agape edited this page Apr 17, 2019 · 7 revisions

PHPJava\Core\JavaArchive

Introduction

JavaArchive class is provided APIs for executing .jar file.

How to use

For an example as follows:

<?php
use PHPJava\Core\JavaArchive;

// You must pass parameters to entrypoint within the `execute` method.
// The `execute` method haven't default parameters.
(new JavaArchive('Test.jar'))
    ->execute([]);

// or
(new JavaArchive('Test.jar'))
    // Specify Test.class on JavaArchive
    ->getClassByName('Test')
    ->getInvoker()
    ->getStatic()
    ->getMethods()
    ->call(
        'main',
        []
    );

Provided methods

Name

public function __construct(string $jarFile, array $options = [])
Introduction

TBD

Parameters

No parameters.

Name

public function __destruct()
Introduction

TBD

Parameters

No parameters.

Name

public function execute(...$arguments)
Introduction

TBD

Parameters

No parameters.

Name

public function __debugInfo()
Introduction

TBD

Parameters

No parameters.

Name

public function getVersion(): ?string
Introduction

TBD

Parameters

No parameters.

Name

public function getCreatedBy(): ?string
Introduction

TBD

Parameters

No parameters.

Name

public function getEntryPointName(): ?string
Introduction

TBD

Parameters

No parameters.

Name

public function getClassPaths(): array
Introduction

TBD

Parameters

No parameters.

Name

public function getClasses(): array
Introduction

TBD

Parameters

No parameters.

Name

public function getClassByName(string $name): JavaClassInterface
Introduction

TBD

Parameters

No parameters.

Clone this wiki locally