System.setProperty(
properties.put(
	public void startup( PlatformConfig config ) throws BirtException	{		IPlatformContext context = config.getPlatformContext( );		if ( context == null )		{			throw new BirtException( PluginId,					"PlatformContext is not setted - {0}", new Object[]{"PlatformConfig"} ); //$NON-NLS-1$		}		String root = context.getPlatform( );		platformDirectory = new File( root );		if ( !platformDirectory.exists( ) || !platformDirectory.isDirectory( ) )		{			throw new BirtException( PluginId,					"Could not start the Framework - {0}" + root, root ); //$NON-NLS-1$		}		if ( frameworkClassLoader != null )		{			logger.log( Level.WARNING, "Framework is already started" ); //$NON-NLS-1$			return;		}		System.setProperty( "osgi.parentClassloader", "fwk" ); //$NON-NLS-1$ //$NON-NLS-2$		// install.area		System.setProperty(				"osgi.install.area", platformDirectory.getAbsolutePath( ) ); //$NON-NLS-1$		// configuration.area		File configurationDirectory = new File( platformDirectory,				"configuration" ); //$NON-NLS-1$		if ( !configurationDirectory.exists( ) )		{			configurationDirectory.mkdirs( );		}		System				.setProperty(						"osgi.configuration.area", configurationDirectory.getAbsolutePath( ) ); //$NON-NLS-1$		// instance.area		File workspaceDirectory = new File( platformDirectory, "workspace" ); //$NON-NLS-1$		if ( !workspaceDirectory.exists( ) )		{			workspaceDirectory.mkdirs( );		}		System.setProperty(				"osgi.instance.area", workspaceDirectory.getAbsolutePath( ) ); //$NON-NLS-1$		System.setProperty( "eclipse.ignoreApp", "true" );		// //$NON-NLS-1$//$NON-NLS-2$		System.setProperty( "osgi.noShutdown", "true" ); //$NON-NLS-1$//$NON-NLS-2$		String path = new File( platformDirectory, "plugins" ).toString( ); //$NON-NLS-1$		path = searchFor( "org.eclipse.osgi", path ); //$NON-NLS-1$		if ( path == null )		{			throw new BirtException( PluginId,					"Could not find the Framework - {0}", new Object[]{"org.eclipse.osgi"} ); //$NON-NLS-1$		}		final String framework = new File( path ).getAbsolutePath( );		String[] args = config.getOSGiArguments( );		if ( args == null )		{			args = new String[]{"-clean"};		}		ClassLoader original = Thread.currentThread( ).getContextClassLoader( );		try		{			URL frameworkUrl = new File( framework ).toURL( );			System					.setProperty(							"osgi.framework", frameworkUrl.toExternalForm( ) ); //$NON-NLS-1$//$NON-NLS-2$			ClassLoader loader = this.getClass( ).getClassLoader( );			frameworkClassLoader = new URLClassLoader( new URL[]{frameworkUrl},					loader );			// frameworkClassLoader = new OSGIClassLoader(			// new URL[]{frameworkUrl}, loader );			//Weblogic 8.1SP6 contains old version JS.JAR, we need			//set pref-web-inf to true, if we set it to true, the			//URL classloader still loads the JS in weblogic, so 			//load the class explicitly.			try			{				loader.loadClass( "org.mozilla.javascript.Context" );				loader.loadClass( "org.mozilla.javascript.Scriptable" );				loader.loadClass( "org.mozilla.javascript.ScriptableObject" );				// frameworkClassLoader.loadClass( "org.mozilla.javascript.Context"			}			catch ( Exception ex )			{			}			Class clazz = frameworkClassLoader.loadClass( ECLIPSE_STARTER );			System.setProperty( "osgi.framework.useSystemProperties", "true" ); //$NON-NLS-1$ //$NON-NLS-2$			Method runMethod = clazz.getMethod(					"startup", new Class[]{String[].class, Runnable.class} ); //$NON-NLS-1$			// Method runMethod = clazz.getMethod(			// "run", new Class[]{String[].class, Runnable.class} );			// //$NON-NLS-1$			bundleContext = runMethod.invoke( null, new Object[]{args, null} );			frameworkContextClassLoader = Thread.currentThread( )					.getContextClassLoader( );		}		catch ( Exception e )		{			e.printStackTrace( );			return;		}		finally		{			Thread.currentThread( ).setContextClassLoader( original );		}	}