|
Packit Bot |
06c835 |
/* Execute a Java program.
|
|
Packit Bot |
06c835 |
Copyright (C) 2001-2002, 2009-2015 Free Software Foundation, Inc.
|
|
Packit Bot |
06c835 |
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
This program is free software: you can redistribute it and/or modify
|
|
Packit Bot |
06c835 |
it under the terms of the GNU General Public License as published by
|
|
Packit Bot |
06c835 |
the Free Software Foundation; either version 3 of the License, or
|
|
Packit Bot |
06c835 |
(at your option) any later version.
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
This program is distributed in the hope that it will be useful,
|
|
Packit Bot |
06c835 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Bot |
06c835 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Bot |
06c835 |
GNU General Public License for more details.
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
You should have received a copy of the GNU General Public License
|
|
Packit Bot |
06c835 |
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
#ifndef _JAVAEXEC_H
|
|
Packit Bot |
06c835 |
#define _JAVAEXEC_H
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
#include <stdbool.h>
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
typedef bool execute_fn (const char *progname,
|
|
Packit Bot |
06c835 |
const char *prog_path, char **prog_argv,
|
|
Packit Bot |
06c835 |
void *private_data);
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
/* Execute a Java class.
|
|
Packit Bot |
06c835 |
class_name is the Java class name to be executed.
|
|
Packit Bot |
06c835 |
classpaths is a list of pathnames to be prepended to the CLASSPATH.
|
|
Packit Bot |
06c835 |
use_minimal_classpath = true means to ignore the user's CLASSPATH and
|
|
Packit Bot |
06c835 |
use a minimal one. This is likely to reduce possible problems if the
|
|
Packit Bot |
06c835 |
user's CLASSPATH contains garbage or a classes.zip file of the wrong
|
|
Packit Bot |
06c835 |
Java version.
|
|
Packit Bot |
06c835 |
exe_dir is a directory that may contain a native executable for the class.
|
|
Packit Bot |
06c835 |
args is a NULL terminated list of arguments to be passed to the program.
|
|
Packit Bot |
06c835 |
If verbose, the command to be executed will be printed.
|
|
Packit Bot |
06c835 |
Then the command is passed to the execute function together with the
|
|
Packit Bot |
06c835 |
private_data argument. This function returns false if OK, true on error.
|
|
Packit Bot |
06c835 |
Return false if OK, true on error.
|
|
Packit Bot |
06c835 |
If quiet, error messages will not be printed. */
|
|
Packit Bot |
06c835 |
extern bool execute_java_class (const char *class_name,
|
|
Packit Bot |
06c835 |
const char * const *classpaths,
|
|
Packit Bot |
06c835 |
unsigned int classpaths_count,
|
|
Packit Bot |
06c835 |
bool use_minimal_classpath,
|
|
Packit Bot |
06c835 |
const char *exe_dir,
|
|
Packit Bot |
06c835 |
const char * const *args,
|
|
Packit Bot |
06c835 |
bool verbose, bool quiet,
|
|
Packit Bot |
06c835 |
execute_fn *executer, void *private_data);
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
#endif /* _JAVAEXEC_H */
|