Jump to content

call java class in php


Petani

Recommended Posts


hi guys, i have problem write java class in php via php java bridge.

 

i try write this java code in php:

http://www.lucenetutorial.com/lucene-in-5-minutes.html

 

when i found this line:

 

IndexReader reader = DirectoryReader.open(index);

 

i dont get it how to write it in php.

i've tried but error result.

 

in DirectoryReader class, i found:

public static DirectoryReader open(Directory directory)

    throws IOException

{

    return StandardDirectoryReader.open(directory, null, 1);

}

 

but, when it be like this:

 

Query q = new QueryParser(Version.LUCENE_40, "content", analyzer).parse(querystr);

 

i write in php like below:

 

$query = new Query\QueryParser($version->LUCENE_43,'content',$analyzer);

$query->parse($querystr);

 

it's no error.

 

 

so, could you help me how to write it in php??

thanks in advance.

 

Link to comment
https://forums.phpfreaks.com/topic/283264-call-java-class-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.