File script = new File( report.getBasePath( ), fileName );
ReportDesignHandle reportDesign = this.getDesign( ); if ( reportDesign != null ) { URL url = reportDesign.findResource( fileName, IResourceLocator.LIBRARY ); if ( url != null ) { fileName = url.getFile( ); } } File scriptFile = new File( fileName );
	public void loadScript( String fileName )	{		File script = new File( report.getBasePath( ), fileName );		// read the script in the file, and execution.		try		{			FileInputStream in = new FileInputStream( script );			byte[] buffer = new byte[in.available( )];			in.read( buffer );			execute( new String( buffer, "UTF-8" ), fileName, 1 ); //$NON-NLS-1$			in.close( );		} catch ( IOException ex )		{			log.log( Level.SEVERE,					"loading external script file " + fileName + " failed.", //$NON-NLS-1$ //$NON-NLS-2$					ex );			addException( new EngineException(					MessageConstants.SCRIPT_FILE_LOAD_ERROR, script							.getAbsolutePath( ), ex ) ); //$NON-NLS-1$			// TODO This is a fatal error. Should throw an exception.		}	}