When I try to run the system it does not return anything, I do not know what might be wrong, I tried to run another jar and it worked, but msm n does not get any parameters. the finder jar works on the linux command line normally
public function consulta(){
$this->output->set_content_type('application/json');
$query = $this->uri->segment(3,0);
exec("java -jar ../public_html/assets/apps/buscador.jar '$query'", $resposta);
$html = "";
$conta = 0;
foreach ($resposta as $value) {
if($conta < 10 && $conta > 1){
$documento = split("\t", $value);
$html .= "<h2><a href=".$documento[1].">".$documento[2]."</a></h2>";
$html .= "<p>".$documento[3]."</p></br>";
}
$conta++;
}
$this->output->set_output(json_encode(array('status' => 'success', 'consulta' => $html, 'resposta' => $resposta)));
}