fc.web.page
Class PageCompiler
java.lang.Object
fc.web.page.PageCompiler
public class PageCompiler
- extends java.lang.Object
Used to compile generated pages by invoking the java compiler.
Constructor Summary |
PageCompiler(java.io.File javafile)
Creates a new page compiler that will use the default (system) classpath
as seen by 'javac' when it is invoked from the command line. |
PageCompiler(java.io.File javafile,
java.lang.String classpath,
java.lang.String encoding)
Creates a new page compiler with the specified classpath. |
Method Summary |
boolean |
compile()
|
java.lang.String |
getError()
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PageCompiler
public PageCompiler(java.io.File javafile)
- Creates a new page compiler that will use the default (system) classpath
as seen by 'javac' when it is invoked from the command line. No
seperate "encoding" flag will be specified to the javac.
PageCompiler
public PageCompiler(java.io.File javafile,
java.lang.String classpath,
java.lang.String encoding)
- Creates a new page compiler with the specified classpath. This is useful
when the classpath must contain some directories within the servlet web
application, just as WEB-INF/classes, WEB-INF/lib etc.
- Parameters:
javafile
- the source java file to compileclasspath
- classpath to use when compilingencoding
- the encoding of the java source file (example
ISO-8859-1, UTF-8 etc.). Used by the -encoding
flag passed to javac. Specify null
for no specific encoding.
getError
public java.lang.String getError()
compile
public boolean compile()
throws java.io.IOException
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception