exec('java -version', $javaver);


print_r($javaver);
echo "<br />";


exec('java -jar start.jar', $output);

print_r($output);
echo "<br />";

exec('java -jar post.jar  /home/content/j/a/n/jandtesting/html/solr/example/exampledocs/solr.xml /home/content/j/a/n/jandtesting/html/solr/example/exampledocs/monitor.xml', $output2);

print_r($output2);

I've never attempted anything with java before. I'm trying to get started on the solr tutorial -- a java based search engine based on Lucene. I don't think I've got this working at all because I probably didn't put the java commands in correctly above. I would really appreciate some guidance.

Galaxygal

exec('java -version', $javaver);


print_r($javaver);
echo "<br />";


exec('java -jar start.jar', $output);

print_r($output);
echo "<br />";

exec('java -jar post.jar  /home/content/j/a/n/jandtesting/html/solr/example/exampledocs/solr.xml /home/content/j/a/n/jandtesting/html/solr/example/exampledocs/monitor.xml', $output2);

print_r($output2);

I've never attempted anything with java before. I'm trying to get started on the solr tutorial -- a java based search engine based on Lucene. I don't think I've got this working at all because I probably didn't put the java commands in correctly above. I would really appreciate some guidance.

Galaxygal

First check if you can execute those commands in the command prompt, because if you can execute those through the command prompt you can use them as it is inside the " exec() "

From within GoDaddy shared hosting, how do I do a command line? I don't think I can do this. If you think this functionality exists for me, please provide direction.

galaxygal

First check if you can execute those commands in the command prompt, because if you can execute those through the command prompt you can use them as it is inside the " exec() "

From within GoDaddy shared hosting, how do I do a command line? I don't think I can do this. If you think this functionality exists for me, please provide direction.

galaxygal

Ok fine, then first check if its a java installed.You getting the version output from the first line or any error

According to GoDaddy, I have a Java servlet. The only thing I get back from each of my exec lines above with output requests is Array().

galaxygal

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.