This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: gij support for slashes in class names
- From: Thomas Fitzsimmons <fitzsim at redhat dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Tue, 30 May 2006 19:28:16 -0400
- Subject: Patch: gij support for slashes in class names
Hi,
gij does not support slashes in class name arguments. This patch adds support
for this syntax, which is convenient when using command-line completion.
OK to commit?
Tom
2006-05-30 Thomas Fitzsimmons <fitzsim@redhat.com>
* gij.cc (main): Convert slashes in class name specification to
dots.
Index: gij.cc
===================================================================
--- gij.cc (revision 114247)
+++ gij.cc (working copy)
@@ -370,6 +370,17 @@
sprintf (darg, "-Djava.class.path=%s", argv[i]);
add_option (vm_args, darg, NULL);
}
+ else
+ {
+ // Handle slashes in class names.
+ int name_length = strlen (argv[i]);
+ for (int c = 0; c < name_length; c++)
+ {
+ char* arg = (char*) argv[i];
+ if (arg[c] == '/')
+ arg[c] = '.';
+ }
+ }
_Jv_RunMain (&vm_args, NULL, argv[i], argc - i,
(char const**) (argv + i), jar_mode);