---
title: "birt中设置BIRT_HOME"
author: "abeetle"
date: "2007-03-20T16:54:00Z"
tags: []
slug: "birt-birt-home"
draft: false
lastmod: "2007-03-20T16:54:00Z"
id: 233874
url: "https://abeetle.iteye.com/blog/233874"
---

缺省情况下BIRT装载*BIRT\_HOME/plugins*目录下的插件（plugin）。

这些插件负责连接数据源，把报表输出到*pdf*和*html*，渲染*chart*图。

*BIRT\_HOME*变量通过*EngineConfig*类的*setEngineHome()*方法设置。

BIRT使用Java File API装载插件。

  //Engine Configuration - set and get temp dir, BIRT home, Servlet context  
  EngineConfig config = new EngineConfig();  
  config.setEngineHome( "C:/Java/Tomcat 5.5/webapps/birt" );

config.setEngineHome( servletContext.getRealPath("/WEB-INF"));