You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Art Welch <ar...@EASTPOINT.COM> on 2001/02/27 01:58:39 UTC

CommandLineOptions change (commit please)

For JDK 1.1 we need to not include the AWT stuff. CommandLineOptions.java
includes a direct reference to AWTStarter and PrintStarter, which will fail
when they are not present. To get around this I propose loading these by
name.

I tried to do a DIFF on this file, but I always get the whole file. I think
that it has something to do with the double CRs on each line (at least that
is what I got). Anyhow, apologies for the manual diff. In the getStarter()
method REPLACE:

	return new AWTStarter(this);

WITH:

	try
	{
	
return((Starter)Class.forName("org.apache.fop.apps.AWTStarter").getConstruct
or(new Class[] {CommandLineOptions.class}).newInstance(new Object[]
{this}));
	}
	catch (Exception e)
	{
            	MessageHandler.errorln("ERROR: AWTStarter could not be
loaded. " + e.toString());
		return(null);
	}

AND REPLACE:

	return new PrintStarter(this);

WITH:

	try
	{
	
return((Starter)Class.forName("org.apache.fop.apps.PrintStarter").getConstru
ctor(new Class[] {CommandLineOptions.class}).newInstance(new Object[]
{this}));
	}
	catch (Exception e)
	{
            	MessageHandler.errorln("ERROR: PrintStarter could not be
loaded. " + e.toString());
		return(null);
	}

Before committing this, it would probably be a good idea to test it. I can
not use the AWT stuff, so I can not test it myself. It compiles OK.

Thank You,
Art


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: CommandLineOptions change (commit please)

Posted by Fotis Jannidis <fo...@lrz.uni-muenchen.de>.
Fop -awt file works without problems, the -print option produces a 
NPE, but this has been the case before all the changes. 
I committed it.

Fotis

Send reply to:  	fop-dev@xml.apache.org
From:           	Art Welch <ar...@EASTPOINT.COM>
To:             	"'fop-dev@xml.apache.org'" <fo...@xml.apache.org>
Subject:        	CommandLineOptions change (commit please)
Date sent:      	Mon, 26 Feb 2001 19:58:39 -0500

> For JDK 1.1 we need to not include the AWT stuff. CommandLineOptions.java
> includes a direct reference to AWTStarter and PrintStarter, which will fail
> when they are not present. To get around this I propose loading these by
> name.
> 
> I tried to do a DIFF on this file, but I always get the whole file. I think
> that it has something to do with the double CRs on each line (at least that
> is what I got). Anyhow, apologies for the manual diff. In the getStarter()
> method REPLACE:
> 
> 	return new AWTStarter(this);
> 
> WITH:
> 
> 	try
> 	{
> 	
> return((Starter)Class.forName("org.apache.fop.apps.AWTStarter").getConstruct
> or(new Class[] {CommandLineOptions.class}).newInstance(new Object[]
> {this}));
> 	}
> 	catch (Exception e)
> 	{
>             	MessageHandler.errorln("ERROR: AWTStarter could not be
> loaded. " + e.toString());
> 		return(null);
> 	}
> 
> AND REPLACE:
> 
> 	return new PrintStarter(this);
> 
> WITH:
> 
> 	try
> 	{
> 	
> return((Starter)Class.forName("org.apache.fop.apps.PrintStarter").getConstru
> ctor(new Class[] {CommandLineOptions.class}).newInstance(new Object[]
> {this}));
> 	}
> 	catch (Exception e)
> 	{
>             	MessageHandler.errorln("ERROR: PrintStarter could not be
> loaded. " + e.toString());
> 		return(null);
> 	}
> 
> Before committing this, it would probably be a good idea to test it. I can
> not use the AWT stuff, so I can not test it myself. It compiles OK.
> 
> Thank You,
> Art
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org