Hi,
I am testing using BIRT Report Engine runtime 3.7.2 with Java application. I have done based on the instruction. However, when I run the Java program, it gives me several errors and complains some packages cannot be found. Here is situation.
I installed BIRT runtime 3.7.2 under Windows 7 64 bit machine on C:\Apps\birt-runtime-3_7_2.
Since I use Windows 7, I setup the BIRT_HOME in Environment Variables as System variable and the Value is C:\Apps\birt-runtime-3_7_2.
I went to C:\Apps\birt-runtime-3_7_2\ReportEngine and run genReport and got html file created successfully.
I then made a test java program in the directory of C:\Apps\src\REAPI\Test.java. the content is as follows:
package REAPI;
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.EngineException;
import org.eclipse.birt.core.exception.CoreException;
public class Test {
public void runReport() throws EngineException
{
EngineConfig config = null;
try{
config = new EngineConfig( );
config.setLogConfig("c:/temp", Level.INFO);
try {
Platform.startup(config);
} catch (Exception e1) {
e1.printStackTrace();
}
} catch(Exception e2) {
e2.printStackTrace();
}
}
/**
*
@param args
*/
public static void main(String[] args) {
try
{
Test ex = new Test( );
ex.runReport();
}
catch ( Exception e3 )
{
e3.printStackTrace();
}
}
}
I made a test.bat file to include all jar files in Report Engine\lib and use Java 1.6 to compile the java program. Here is the test.bat in C:\Apps\src
set BIRTCLASSPATH=
for %%i in (%BIRT_HOME%\ReportEngine\lib\*.jar) do set BIRTCLASSPATH=%%i;!BIRTCLASSPATH!
javac -cp "%BIRTCLASSPATH%";C:\Apps\src REAPI/Test.java
After I run this batch file, I got 9 errors and one of them is package org.eclipse.birt.core.framework doe not exist. (Please see attached file about more error information). I do not know what setup I need to do in order for finding the packages it complains or what have I done wrong.
Could anyone there lift me on this because I am really frustrated and people are waiting on me to setup this report engine for our Java application?
Appreciate ahead!!!
Richard
P.S. Please see attachment to take a look more on error messages.