[eluser]kikz4life[/eluser]
is it possible in CI to work php + java . I'm trying to build a report using php but to display its format(html or xls, etc..) i used some java codes inside the php file and it works

but when i tried to CI a FATAL ERROR occured.

. I just used controller and the view for this.
My view.php
Code:
$myReport = "receipt_report2.rptdesign";
// load resources, .rpt files and images from the current working dir
$here = getcwd();
$ctx = java_context()->getServletContext();
$birtReportEngine = java("org.eclipse.birt.php.birtengine.BirtEngine")->getBirtEngine($ctx);
java_context()->onShutdown(java("org.eclipse.birt.php.birtengine.BirtEngine")->getShutdownHook());
// Create a HTML render context
$renderContext = new java ("org.eclipse.birt.report.engine.api.HTMLRenderContext");
$renderContext->setBaseImageURL("$here/images");
$contextMap = new java("java.util.HashMap");
$CONTEXT = java("org.eclipse.birt.report.engine.api.EngineConstants")->APPCONTEXT_HTML_RENDER_CONTEXT;
$contextMap->put($CONTEXT, $renderContext );
// Load the report design
$design = $birtReportEngine->openReportDesign("${here}/${myReport}");
$task = $birtReportEngine->createRunAndRenderTask( $design );
$task->setAppContext( $contextMap );
// Add HTML render options
$options = new java("org.eclipse.birt.report.engine.api.HTMLRenderOption");
$options->setOutputFormat($options->OUTPUT_FORMAT_HTML);
// Create the output
$out = new java("java.io.ByteArrayOutputStream");
$options->setOutputStream($out);
$task->setRenderOption($options);
$task->run ();
$task->close();
// Return the generated output to the client
echo (string)$out;
also is it possible to call the myview outside CI directory but using the CI controller?
thanks