New module 'javacomp'.
[gnulib.git] / lib / javacomp.h
1 /* Compile a Java program.
2    Copyright (C) 2001-2002 Free Software Foundation, Inc.
3    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
4
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 2, or (at your option)
8    any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program; if not, write to the Free Software Foundation,
17    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
18
19 #ifndef _JAVACOMP_H
20 #define _JAVACOMP_H
21
22 #include <stdbool.h>
23
24 /* Compile a Java source file to bytecode.
25    java_sources is an array of source file names.
26    classpaths is a list of pathnames to be prepended to the CLASSPATH.
27    directory is the target directory. The .class file for class X.Y.Z is
28    written at directory/X/Y/Z.class. If directory is NULL, the .class
29    file is written in the source's directory.
30    use_minimal_classpath = true means to ignore the user's CLASSPATH and
31    use a minimal one. This is likely to reduce possible problems if the
32    user's CLASSPATH contains garbage or a classes.zip file of the wrong
33    Java version.
34    If verbose, the command to be executed will be printed.
35    Return false if OK, true on error.  */
36 extern bool compile_java_class (const char * const *java_sources,
37                                 unsigned int java_sources_count,
38                                 const char * const *classpaths,
39                                 unsigned int classpaths_count,
40                                 const char *directory,
41                                 bool optimize, bool debug,
42                                 bool use_minimal_classpath,
43                                 bool verbose);
44
45 #endif /* _JAVACOMP_H */