You are here

public function JavaService::setJavaPath in Search File Attachments 8

Set the java path.

Parameters

string $path: The path to the java binary.

Return value

\Drupal\search_file_attachments\JavaService This class itself.

1 call to JavaService::setJavaPath()
JavaService::__construct in src/JavaService.php
Constructor.

File

src/JavaService.php, line 37

Class

JavaService
Service class to define and check the java binary for the tika library.

Namespace

Drupal\search_file_attachments

Code

public function setJavaPath($path) {
  if (strpos(ini_get('extension_dir'), 'MAMP/')) {
    $path = 'export DYLD_LIBRARY_PATH=""; ' . $path;
  }
  $this->javaPath = $path;
  return $this;
}