aboutsummaryrefslogtreecommitdiff
path: root/libjava/prims.cc
diff options
context:
space:
mode:
authorAnthony Green <green@redhat.com>2002-02-07 03:24:12 +0000
committerAnthony Green <green@gcc.gnu.org>2002-02-07 03:24:12 +0000
commitb5ee195f1e3f11a5979841bedbf932926ffe5322 (patch)
tree27d9ff28c3ab0424e26761a6636a9afcbf395114 /libjava/prims.cc
parent383aa2ef4972a828f0be6f36ff7f3e1c742fb173 (diff)
downloadgcc-b5ee195f1e3f11a5979841bedbf932926ffe5322.zip
gcc-b5ee195f1e3f11a5979841bedbf932926ffe5322.tar.gz
gcc-b5ee195f1e3f11a5979841bedbf932926ffe5322.tar.bz2
embedded updates
From-SVN: r49562
Diffstat (limited to 'libjava/prims.cc')
-rw-r--r--libjava/prims.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/libjava/prims.cc b/libjava/prims.cc
index 55e6da4..ec6263c 100644
--- a/libjava/prims.cc
+++ b/libjava/prims.cc
@@ -1001,13 +1001,18 @@ _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv,
java::lang::Runtime *runtime = NULL;
+
+#ifdef DISABLE_MAIN_ARGS
+ _Jv_ThisExecutable ("[Embedded App]");
+#else
#ifdef HAVE_PROC_SELF_EXE
char exec_name[20];
sprintf (exec_name, "/proc/%d/exe", getpid ());
_Jv_ThisExecutable (exec_name);
#else
_Jv_ThisExecutable (argv[0]);
-#endif
+#endif /* HAVE_PROC_SELF_EXE */
+#endif /* DISABLE_MAIN_ARGS */
try
{
@@ -1021,7 +1026,11 @@ _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv,
// for `main'; that way it will be set up if `main' is a JNI method.
runtime = java::lang::Runtime::getRuntime ();
+#ifdef DISABLE_MAIN_ARGS
+ arg_vec = JvConvertArgv (0, 0);
+#else
arg_vec = JvConvertArgv (argc - 1, argv + 1);
+#endif
using namespace gnu::gcj::runtime;
if (klass)