Skip to main content



      Home
Home » Archived » BIRT » embedding BIRT in a stand alone java application
embedding BIRT in a stand alone java application [message #366451] Fri, 02 January 2009 10:26 Go to next message
Eclipse UserFriend
I'm trying to embed BIRT 2.2.2 in a stand alone Java application (1.6). I'm not getting far using the examples at:

http://www.eclipse.org/birt/phoenix/deploy/reportEngineAPI.p hp


I would first like to point out that there are many syntax errors in the example source codes, like "final config = new EngineConfig( );", or duplicate variables. But I can work around that, no problem.
What is problematic is that the code is not running. Below my current test class which just tries to generate a PDF of a report that runs correctly in the designer:

import java.util.logging.Level;

import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.report.engine.api.EngineConfig;
import org.eclipse.birt.report.engine.api.EngineConstants;
import org.eclipse.birt.report.engine.api.IPDFRenderOption;
import org.eclipse.birt.report.engine.api.IRenderOption;
import org.eclipse.birt.report.engine.api.IRenderTask;
import org.eclipse.birt.report.engine.api.IReportDocument;
import org.eclipse.birt.report.engine.api.IReportEngine;
import org.eclipse.birt.report.engine.api.IReportEngineFactory;
import org.eclipse.birt.report.engine.api.PDFRenderOption;
import org.eclipse.birt.report.engine.api.RenderOption;

public class FirstTest
{

/**
* @param args
*/
public static void main(String[] args)
{
try{
final EngineConfig config = new EngineConfig( );
config.setEngineHome( "C:/tmp/birt-runtime-2_2_2/birt-runtime-2_2_2/ReportEngine" );
config.setLogConfig("c:/tmp/", Level.FINEST);

Platform.startup( config ); //If using RE API in Eclipse/RCP application this is not needed.
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
IReportEngine engine = factory.createReportEngine( config );
engine.changeLogLevel( Level.WARNING );

//
//Open a report document
IReportDocument iReportDocument = engine.openReportDocument(" C:/tmp/birt-rcp-report-designer-2_2_2/birt-rcp-report-design er-2_2_2/workspace/new_report.rptdesign ");

IRenderOption options = new RenderOption();
options.setOutputFormat("pdf");
options.setOutputFileName("c:/tmp/test.pdf");

PDFRenderOption pdfOptions = new PDFRenderOption( options );
pdfOptions.setOption( IPDFRenderOption.FIT_TO_PAGE, new Boolean(true) );
pdfOptions.setOption( IPDFRenderOption.PAGEBREAK_PAGINATION_ONLY, new Boolean(true) );

IRenderTask task = engine.createRenderTask(iReportDocument);
task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOA DER_KEY, FirstTest.class.getClassLoader());
task.setRenderOption(options);
//task.setPageRange("1-2");
task.render();
iReportDocument.close();

//
engine.destroy();
Platform.shutdown();
System.out.println("done");
}
catch( Exception ex){
ex.printStackTrace();
}
}

}


This results in:

java.lang.NullPointerException
at nl.reinders.birt.FirstTest.main(FirstTest.java:38)

Line 38 is the "factory.createReportEngine" line. There is no logging output in the "c:/tmp/" directory, so I'm a bit clueless on what is going wrong.

Any suggestions?
Re: embedding BIRT in a stand alone java application [message #366455 is a reply to message #366451] Fri, 02 January 2009 12:57 Go to previous messageGo to next message
Eclipse UserFriend
Hi tbee,

There are a couple of examples at
http://www.birt-exchange.com/devshare/deploying-birt-reports /568-execute-birt-reports-from-java-class/#description

Virgil Dodson
http://www.birt-exchange.com

tbee wrote:
> I'm trying to embed BIRT 2.2.2 in a stand alone Java application (1.6).
> I'm not getting far using the examples at:
>
> http://www.eclipse.org/birt/phoenix/deploy/reportEngineAPI.p hp
>
>
> I would first like to point out that there are many syntax errors in the
> example source codes, like "final config = new EngineConfig( );", or
> duplicate variables. But I can work around that, no problem.
> What is problematic is that the code is not running. Below my current
> test class which just tries to generate a PDF of a report that runs
> correctly in the designer:
>
> import java.util.logging.Level;
>
> import org.eclipse.birt.core.framework.Platform;
> import org.eclipse.birt.report.engine.api.EngineConfig;
> import org.eclipse.birt.report.engine.api.EngineConstants;
> import org.eclipse.birt.report.engine.api.IPDFRenderOption;
> import org.eclipse.birt.report.engine.api.IRenderOption;
> import org.eclipse.birt.report.engine.api.IRenderTask;
> import org.eclipse.birt.report.engine.api.IReportDocument;
> import org.eclipse.birt.report.engine.api.IReportEngine;
> import org.eclipse.birt.report.engine.api.IReportEngineFactory;
> import org.eclipse.birt.report.engine.api.PDFRenderOption;
> import org.eclipse.birt.report.engine.api.RenderOption;
>
> public class FirstTest
> {
>
> /**
> * @param args
> */
> public static void main(String[] args)
> {
> try{
> final EngineConfig config = new EngineConfig( );
> config.setEngineHome(
> "C:/tmp/birt-runtime-2_2_2/birt-runtime-2_2_2/ReportEngine" );
> config.setLogConfig("c:/tmp/", Level.FINEST);
>
> Platform.startup( config ); //If using RE API in
> Eclipse/RCP application this is not needed.
> IReportEngineFactory factory = (IReportEngineFactory)
> Platform.createFactoryObject(
> IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
> IReportEngine engine = factory.createReportEngine( config );
> engine.changeLogLevel( Level.WARNING );
>
> //
> //Open a report document
> IReportDocument iReportDocument =
> engine.openReportDocument(" C:/tmp/birt-rcp-report-designer-2_2_2/birt-rcp-report-design er-2_2_2/workspace/new_report.rptdesign ");
>
>
> IRenderOption options = new RenderOption();
> options.setOutputFormat("pdf");
> options.setOutputFileName("c:/tmp/test.pdf");
>
> PDFRenderOption pdfOptions = new PDFRenderOption( options );
> pdfOptions.setOption( IPDFRenderOption.FIT_TO_PAGE, new
> Boolean(true) );
> pdfOptions.setOption(
> IPDFRenderOption.PAGEBREAK_PAGINATION_ONLY, new Boolean(true) );
>
> IRenderTask task =
> engine.createRenderTask(iReportDocument);
>
> task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOA DER_KEY,
> FirstTest.class.getClassLoader());
> task.setRenderOption(options);
> //task.setPageRange("1-2");
> task.render();
> iReportDocument.close();
>
> //
> engine.destroy();
> Platform.shutdown();
> System.out.println("done");
> }
> catch( Exception ex){
> ex.printStackTrace();
> }
> }
>
> }
>
>
> This results in:
>
> java.lang.NullPointerException
> at nl.reinders.birt.FirstTest.main(FirstTest.java:38)
>
> Line 38 is the "factory.createReportEngine" line. There is no logging
> output in the "c:/tmp/" directory, so I'm a bit clueless on what is
> going wrong.
>
> Any suggestions?
>
>
>
Re: embedding BIRT in a stand alone java application [message #366462 is a reply to message #366455] Sat, 03 January 2009 02:21 Go to previous messageGo to next message
Eclipse UserFriend
> There are a couple of examples at
> http://www.birt-exchange.com/devshare/deploying-birt-reports /568-execute-birt-reports-from-java-class/#description

Well, I copied the "RenderReport" class exactly and only replaced the paths.

package nl.reinders.birt;

import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.report.engine.api.EngineConfig;
import org.eclipse.birt.report.engine.api.EngineException;
import org.eclipse.birt.report.engine.api.HTMLRenderOption;
import org.eclipse.birt.report.engine.api.IPDFRenderOption;
import org.eclipse.birt.report.engine.api.IRenderOption;
import org.eclipse.birt.report.engine.api.IRenderTask;
import org.eclipse.birt.report.engine.api.IReportDocument;
import org.eclipse.birt.report.engine.api.IReportEngine;
import org.eclipse.birt.report.engine.api.IReportEngineFactory;
import org.eclipse.birt.report.engine.api.IReportRunnable;
import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
import org.eclipse.birt.report.engine.api.PDFRenderOption;
import org.eclipse.birt.report.engine.api.RenderOption;
import org.eclipse.birt.report.model.elements.olap.Level;

public class RenderReport
{
public static void main(String[] args)
{
try
{
renderReport();
}
catch (Exception e)
{
e.printStackTrace();
}
}

static void renderReport() throws EngineException
{

IReportEngine engine = null;
EngineConfig config = null;

try
{
config = new EngineConfig();
config.setBIRTHome(" C:\\tmp\\birt-runtime-2_2_2\\birt-runtime-2_2_2\\ReportEngin e ");
config.setLogConfig("c:\\tmp\\", java.util.logging.Level.FINEST);
Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_ REPORT_ENGINE_FACTORY);
engine = factory.createReportEngine(config);

// Open a report document
IReportDocument document = engine.openReportDocument(" C:\\tmp\\birt-rcp-report-designer-2_2_2\\birt-rcp-report-des igner-2_2_2\\workspace\\new_report.rptdesign ");
// Create Render Task
IRenderTask task = engine.createRenderTask(document);
// Set parent classloader report engine
// task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOA DER_KEY, RenderTaskExample.class.getClassLoader());

PDFRenderOption pdfOptions = new PDFRenderOption();
pdfOptions.setOption(IPDFRenderOption.FIT_TO_PAGE, new Boolean(true));
// pdfOptions.setOption( IPDFRenderOption.PAGEBREAK_PAGINATION_ONLY, new Boolean(true) );
pdfOptions.setOutputFormat("pdf");
pdfOptions.setOutputFileName("c:\\tmp\\test.pdf");

task.setRenderOption(pdfOptions);
task.render();
document.close();
task.close();
engine.destroy();
}
catch (Exception ex)
{
ex.printStackTrace();
}
finally
{
Platform.shutdown();
}

}
}


I still get an exception on the createReportEngine; createFactoryObject returns a null.

java.lang.NullPointerException
at nl.reinders.birt.RenderReport.renderReport(RenderReport.java :52)
at nl.reinders.birt.RenderReport.main(RenderReport.java:31)

If only BIRT would log why, but there are no log files in c:\tmp.

Tom

PS: why is the "setBIRTHome" required? If all JARS have been included in the classpath... I usually get cautious when I see such a construct.
Re: embedding BIRT in a stand alone java application [message #366465 is a reply to message #366462] Sat, 03 January 2009 07:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johnw.innoventsolutions.com

What version of BIRT are you using? 2.2.2?

Also, the BIRT_HOME variable is required because BIRT runs as a plugin,
not a purely Java object. So, even though you are using it in a Java
project, the BIRT runtime is executed through some sort of Eclipse-like
plugin environment, which is what the Platform.startup call is doing. If
you were to run this as an RCP or OSGi project, you could omit the BIRT
home setting and Platform.startup calls.

John

tbee wrote:
>> There are a couple of examples at
>> http://www.birt-exchange.com/devshare/deploying-birt-reports /568-execute-birt-reports-from-java-class/#description
>
>
> Well, I copied the "RenderReport" class exactly and only replaced the
> paths.
>
> package nl.reinders.birt;
>
> import org.eclipse.birt.core.framework.Platform;
> import org.eclipse.birt.report.engine.api.EngineConfig;
> import org.eclipse.birt.report.engine.api.EngineException;
> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
> import org.eclipse.birt.report.engine.api.IPDFRenderOption;
> import org.eclipse.birt.report.engine.api.IRenderOption;
> import org.eclipse.birt.report.engine.api.IRenderTask;
> import org.eclipse.birt.report.engine.api.IReportDocument;
> import org.eclipse.birt.report.engine.api.IReportEngine;
> import org.eclipse.birt.report.engine.api.IReportEngineFactory;
> import org.eclipse.birt.report.engine.api.IReportRunnable;
> import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
> import org.eclipse.birt.report.engine.api.PDFRenderOption;
> import org.eclipse.birt.report.engine.api.RenderOption;
> import org.eclipse.birt.report.model.elements.olap.Level;
>
> public class RenderReport
> {
> public static void main(String[] args)
> {
> try
> {
> renderReport();
> }
> catch (Exception e)
> {
> e.printStackTrace();
> }
> }
>
> static void renderReport() throws EngineException
> {
>
> IReportEngine engine = null;
> EngineConfig config = null;
>
> try
> {
> config = new EngineConfig();
>
> config.setBIRTHome(" C:\\tmp\\birt-runtime-2_2_2\\birt-runtime-2_2_2\\ReportEngin e ");
>
> config.setLogConfig("c:\\tmp\\",
> java.util.logging.Level.FINEST);
> Platform.startup(config);
> IReportEngineFactory factory = (IReportEngineFactory)
> Platform.createFactoryObject(IReportEngineFactory.EXTENSION_ REPORT_ENGINE_FACTORY);
>
> engine = factory.createReportEngine(config);
>
> // Open a report document
> IReportDocument document =
> engine.openReportDocument(" C:\\tmp\\birt-rcp-report-designer-2_2_2\\birt-rcp-report-des igner-2_2_2\\workspace\\new_report.rptdesign ");
>
> // Create Render Task
> IRenderTask task = engine.createRenderTask(document);
> // Set parent classloader report engine
> //
> task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOA DER_KEY,
> RenderTaskExample.class.getClassLoader());
>
> PDFRenderOption pdfOptions = new PDFRenderOption();
> pdfOptions.setOption(IPDFRenderOption.FIT_TO_PAGE, new
> Boolean(true));
> // pdfOptions.setOption(
> IPDFRenderOption.PAGEBREAK_PAGINATION_ONLY, new Boolean(true) );
> pdfOptions.setOutputFormat("pdf");
> pdfOptions.setOutputFileName("c:\\tmp\\test.pdf");
>
> task.setRenderOption(pdfOptions);
> task.render();
> document.close();
> task.close();
> engine.destroy();
> }
> catch (Exception ex)
> {
> ex.printStackTrace();
> }
> finally
> {
> Platform.shutdown();
> }
>
> }
> }
>
>
> I still get an exception on the createReportEngine; createFactoryObject
> returns a null.
>
> java.lang.NullPointerException
> at nl.reinders.birt.RenderReport.renderReport(RenderReport.java :52)
> at nl.reinders.birt.RenderReport.main(RenderReport.java:31)
>
> If only BIRT would log why, but there are no log files in c:\tmp.
>
> Tom
>
> PS: why is the "setBIRTHome" required? If all JARS have been included in
> the classpath... I usually get cautious when I see such a construct.
Re: embedding BIRT in a stand alone java application [message #366468 is a reply to message #366465] Sat, 03 January 2009 17:54 Go to previous messageGo to next message
Eclipse UserFriend
> What version of BIRT are you using? 2.2.2?

birt-runtime-2_2_2
Re: embedding BIRT in a stand alone java application [message #366469 is a reply to message #366462] Sat, 03 January 2009 18:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johnw.innoventsolutions.com

Give this a try instead of using the EngineConfig to pass into the
Platform. Using the PlatformConfig might have been deprecated (I cant
remember off hand), but it should still work in 2.2.2. this is from a
recent project I worked on, and I dont have any issues with it. Just
make sure your BIRT_HOME is pointing to the root folder containing the
/plugins, /lib, and /configuration directories.

//initialize the Eclipse platform, plugins, and report engine
PlatformConfig platformConfig = new PlatformConfig();
platformConfig.setBIRTHome(BIRT_HOME);
Platform.startup(platformConfig);

//create a new report engine factory
IReportEngineFactory factory = (IReportEngineFactory)
Platform.createFactoryObject(IReportEngineFactory.EXTENSION_ REPORT_ENGINE_FACTORY);

//create a new report engine
EngineConfig engineConfig = new EngineConfig();
engineConfig.setBIRTHome(BIRT_HOME); //will replace with configuration file
engine = factory.createReportEngine(engineConfig);

tbee wrote:
>> There are a couple of examples at
>> http://www.birt-exchange.com/devshare/deploying-birt-reports /568-execute-birt-reports-from-java-class/#description
>
>
> Well, I copied the "RenderReport" class exactly and only replaced the
> paths.
>
> package nl.reinders.birt;
>
> import org.eclipse.birt.core.framework.Platform;
> import org.eclipse.birt.report.engine.api.EngineConfig;
> import org.eclipse.birt.report.engine.api.EngineException;
> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
> import org.eclipse.birt.report.engine.api.IPDFRenderOption;
> import org.eclipse.birt.report.engine.api.IRenderOption;
> import org.eclipse.birt.report.engine.api.IRenderTask;
> import org.eclipse.birt.report.engine.api.IReportDocument;
> import org.eclipse.birt.report.engine.api.IReportEngine;
> import org.eclipse.birt.report.engine.api.IReportEngineFactory;
> import org.eclipse.birt.report.engine.api.IReportRunnable;
> import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
> import org.eclipse.birt.report.engine.api.PDFRenderOption;
> import org.eclipse.birt.report.engine.api.RenderOption;
> import org.eclipse.birt.report.model.elements.olap.Level;
>
> public class RenderReport
> {
> public static void main(String[] args)
> {
> try
> {
> renderReport();
> }
> catch (Exception e)
> {
> e.printStackTrace();
> }
> }
>
> static void renderReport() throws EngineException
> {
>
> IReportEngine engine = null;
> EngineConfig config = null;
>
> try
> {
> config = new EngineConfig();
>
> config.setBIRTHome(" C:\\tmp\\birt-runtime-2_2_2\\birt-runtime-2_2_2\\ReportEngin e ");
>
> config.setLogConfig("c:\\tmp\\",
> java.util.logging.Level.FINEST);
> Platform.startup(config);
> IReportEngineFactory factory = (IReportEngineFactory)
> Platform.createFactoryObject(IReportEngineFactory.EXTENSION_ REPORT_ENGINE_FACTORY);
>
> engine = factory.createReportEngine(config);
>
> // Open a report document
> IReportDocument document =
> engine.openReportDocument(" C:\\tmp\\birt-rcp-report-designer-2_2_2\\birt-rcp-report-des igner-2_2_2\\workspace\\new_report.rptdesign ");
>
> // Create Render Task
> IRenderTask task = engine.createRenderTask(document);
> // Set parent classloader report engine
> //
> task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOA DER_KEY,
> RenderTaskExample.class.getClassLoader());
>
> PDFRenderOption pdfOptions = new PDFRenderOption();
> pdfOptions.setOption(IPDFRenderOption.FIT_TO_PAGE, new
> Boolean(true));
> // pdfOptions.setOption(
> IPDFRenderOption.PAGEBREAK_PAGINATION_ONLY, new Boolean(true) );
> pdfOptions.setOutputFormat("pdf");
> pdfOptions.setOutputFileName("c:\\tmp\\test.pdf");
>
> task.setRenderOption(pdfOptions);
> task.render();
> document.close();
> task.close();
> engine.destroy();
> }
> catch (Exception ex)
> {
> ex.printStackTrace();
> }
> finally
> {
> Platform.shutdown();
> }
>
> }
> }
>
>
> I still get an exception on the createReportEngine; createFactoryObject
> returns a null.
>
> java.lang.NullPointerException
> at nl.reinders.birt.RenderReport.renderReport(RenderReport.java :52)
> at nl.reinders.birt.RenderReport.main(RenderReport.java:31)
>
> If only BIRT would log why, but there are no log files in c:\tmp.
>
> Tom
>
> PS: why is the "setBIRTHome" required? If all JARS have been included in
> the classpath... I usually get cautious when I see such a construct.
Re: embedding BIRT in a stand alone java application [message #366470 is a reply to message #366469] Sun, 04 January 2009 02:23 Go to previous messageGo to next message
Eclipse UserFriend
> Give this a try instead of using the EngineConfig to pass into the
> Platform. Using the PlatformConfig might have been deprecated (I cant
> remember off hand), but it should still work in 2.2.2. this is from a
> recent project I worked on, and I dont have any issues with it. Just
> make sure your BIRT_HOME is pointing to the root folder containing the
> /plugins, /lib, and /configuration directories.
>
> //initialize the Eclipse platform, plugins, and report engine
> PlatformConfig platformConfig = new PlatformConfig();
> platformConfig.setBIRTHome(BIRT_HOME);
> Platform.startup(platformConfig);
>
> //create a new report engine factory
> IReportEngineFactory factory = (IReportEngineFactory)
> Platform.createFactoryObject(IReportEngineFactory.EXTENSION_ REPORT_ENGINE_FACTORY);
>
>
> //create a new report engine
> EngineConfig engineConfig = new EngineConfig();
> engineConfig.setBIRTHome(BIRT_HOME); //will replace with configuration file
> engine = factory.createReportEngine(engineConfig);
>

factory=null
java.lang.NullPointerException
at nl.reinders.birt.RenderReport.renderReport(RenderReport.java :60)
at nl.reinders.birt.RenderReport.main(RenderReport.java:32)

As you can see, the factory still is null.

I have triple checked that the directory I use as the BIRT_HOME indeeds points to the one with the plugins. I'm wondering why there is no trace information at all. Not even an empty log file.

//initialize the Eclipse platform, plugins, and report engine
PlatformConfig platformConfig = new PlatformConfig();
platformConfig.setBIRTHome(" C:\\tmp\\birt-runtime-2_2_2\\birt-runtime-2_2_2\\ReportEngin e ");
Platform.startup(platformConfig);

//create a new report engine factory
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_ REPORT_ENGINE_FACTORY);
System.out.println("factory=" + factory);

//create a new report engine
EngineConfig engineConfig = new EngineConfig();
engineConfig.setLogConfig("c:\\tmp\\", java.util.logging.Level.FINEST);
engineConfig.setBIRTHome(" C:\\tmp\\birt-runtime-2_2_2\\birt-runtime-2_2_2\\ReportEngin e "); //will replace with configuration file
engine = factory.createReportEngine(engineConfig);

From a DOS console:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\user>cd C:\tmp\birt-runtime-2_2_2\birt-runtime-2_2_2\R
eportEngine

C:\tmp\birt-runtime-2_2_2\birt-runtime-2_2_2\ReportEngine>dir
Volume in drive C has no label.
Volume Serial Number is B4FA-7086

Directory of C:\tmp\birt-runtime-2_2_2\birt-runtime-2_2_2\ReportEngine

04-01-2009 08:16 <DIR> .
04-01-2009 08:16 <DIR> ..
04-01-2009 08:16 <DIR> configuration
27-02-2008 13:08 2.907 genReport.bat
27-02-2008 13:08 2.703 genReport.sh
27-02-2008 13:08 <DIR> lib
27-02-2008 13:08 <DIR> plugins
27-02-2008 13:08 <DIR> samples
02-01-2009 16:09 <DIR> workspace
2 File(s) 5.610 bytes
7 Dir(s) 10.625.540.096 bytes free
Re: embedding BIRT in a stand alone java application [message #366471 is a reply to message #366465] Sun, 04 January 2009 02:29 Go to previous messageGo to next message
Eclipse UserFriend
> Also, the BIRT_HOME variable is required because BIRT runs as a plugin,
> not a purely Java object. So, even though you are using it in a Java
> project, the BIRT runtime is executed through some sort of Eclipse-like
> plugin environment, which is what the Platform.startup call is doing. If
> you were to run this as an RCP or OSGi project, you could omit the BIRT
> home setting and Platform.startup calls.

Ok, but I still find such external references, ehm, uncomfortable; plugin logic can be written using the classpath alone.

But never mind, it is not up to me -at this time- to have an opinion on the chosen architecture. Especially since I do understand what an RCP or OSGi project is, but have not technical experience with them at all. Another point I intend to remedy sometime; the JRE seems to be going OSGi as well in favor of the intended new JAR jsr.
Re: embedding BIRT in a stand alone java application [message #366473 is a reply to message #366471] Sun, 04 January 2009 04:23 Go to previous message
Eclipse UserFriend
Originally posted by: johnw.innoventsolutions.com

The BIRT_HOME variable just tells the launcher where the plugins are
located. I suppose there is a way to do it with a configuration to avoid
having to set BIRT_HOME, but I've never needed to do so in Java projects
so I couldn't tell you how.

John

tbee wrote:
>> Also, the BIRT_HOME variable is required because BIRT runs as a
>> plugin, not a purely Java object. So, even though you are using it in
>> a Java project, the BIRT runtime is executed through some sort of
>> Eclipse-like plugin environment, which is what the Platform.startup
>> call is doing. If you were to run this as an RCP or OSGi project, you
>> could omit the BIRT home setting and Platform.startup calls.
>
> Ok, but I still find such external references, ehm, uncomfortable;
> plugin logic can be written using the classpath alone.
>
> But never mind, it is not up to me -at this time- to have an opinion on
> the chosen architecture. Especially since I do understand what an RCP or
> OSGi project is, but have not technical experience with them at all.
> Another point I intend to remedy sometime; the JRE seems to be going
> OSGi as well in favor of the intended new JAR jsr.
Previous Topic:Newbie info request
Next Topic:Interactive report
Goto Forum:
  


Current Time: Fri Oct 31 19:14:08 EDT 2025

Powered by FUDForum. Page generated in 0.55991 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top