public class PageCompiler extends Object
Constructor and Description |
---|
PageCompiler(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(File javafile,
String classpath,
String encoding)
Creates a new page compiler with the specified classpath.
|
Modifier and Type | Method and Description |
---|---|
boolean |
compile() |
String |
getError() |
static void |
main(String[] args) |
public PageCompiler(File javafile)
public PageCompiler(File javafile, String classpath, String encoding)
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. Modern Java platforms *seem* to default to UTF-8
(used to be ISO-8859-1 back in the day) if nothing is specified.
When invoked/used internally (ie not seperately from the command line), we
specify a Page.DEFAULT_SRC_ENCODING
as the src encoding anyway.
public boolean compile() throws IOException
IOException