1 /* Execute a Java program.
2 Copyright (C) 2001-2002, 2009-2024 Free Software Foundation, Inc.
3 Written by Bruno Haible <haible@clisp.cons.org>, 2001.
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 3 of the License, or
8 (at your option) any later version.
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.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
26 typedef bool execute_fn (const char *progname
,
27 const char *prog_path
, const char * const *prog_argv
,
30 /* Execute a Java class.
31 class_name is the Java class name to be executed.
32 classpaths is a list of pathnames to be prepended to the CLASSPATH.
33 use_minimal_classpath = true means to ignore the user's CLASSPATH and
34 use a minimal one. This is likely to reduce possible problems if the
35 user's CLASSPATH contains garbage or a classes.zip file of the wrong
37 exe_dir is a directory that may contain a native executable for the class.
38 args is a NULL terminated list of arguments to be passed to the program.
39 If verbose, the command to be executed will be printed.
40 Then the command is passed to the execute function together with the
41 private_data argument. This function returns false if OK, true on error.
42 Return false if OK, true on error.
43 If quiet, error messages will not be printed. */
44 extern bool execute_java_class (const char *class_name
,
45 const char * const *classpaths
,
46 unsigned int classpaths_count
,
47 bool use_minimal_classpath
,
49 const char * const *args
,
50 bool verbose
, bool quiet
,
51 execute_fn
*executer
, void *private_data
);
58 #endif /* _JAVAEXEC_H */