From b6121641fcd1aad93643d1f56440217ee9dc1c1c Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Sat, 2 Apr 2005 02:26:51 +0000 Subject: re PR libgcj/20090 (gij should be implemented in Java) 2005-04-01 Thomas Fitzsimmons * gcj.texi (Invoking gij): Add descriptions of new -X options. Mention recognized-and-ignored compatibility options. (Memory allocation): Add descriptions of JvMalloc, JvRealloc and JvFree. (About CNI): Add Memory allocation section. 2005-04-01 Thomas Fitzsimmons PR libgcj/20090, PR libgcj/20526 * gij.cc (nonstandard_opts_help): New function. (add_option): New function. (main): Support java options. Set java.class.path. Don't set _Jv_Jar_Class_Path. * prims.cc (parse_x_arg): New function. (parse_init_args): Call parse_x_arg for -X and _ options, when ignoreUnrecognized is true. (new _Jv_RunMain): New vm_args variant. (old _Jv_RunMain): Call new vm_args _Jv_RunMain. (_Jv_Jar_Class_Path): Remove variable. * include/java-props.h: Likewise. * include/cni.h (JvRealloc): New function. * include/jvm.h (_Jv_RunMain): Declare vm_args variant. * java/lang/natRuntime.cc (insertSystemProperties): Remove _Jv_Jar_Class_Path logic. Use JV_VERSION and JV_API_VERSION macros. * configure.ac (JV_VERSION): Define. (JV_API_VERSION): Likewise. * configure: Regenerate. * include/config.h.in: Regenerate. From-SVN: r97429 --- libjava/java/lang/natRuntime.cc | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) (limited to 'libjava/java') diff --git a/libjava/java/lang/natRuntime.cc b/libjava/java/lang/natRuntime.cc index 248bf44..d9529e8 100644 --- a/libjava/java/lang/natRuntime.cc +++ b/libjava/java/lang/natRuntime.cc @@ -369,8 +369,8 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops) // (introduced in 1.2), and earlier versioning properties. Some // programs rely on seeing values that they expect, so we claim to // be a 1.4-ish VM for their sake. - SET ("java.version", "1.4.2"); - SET ("java.runtime.version", "1.4.2"); + SET ("java.version", JV_VERSION); + SET ("java.runtime.version", JV_VERSION); SET ("java.vendor", "Free Software Foundation, Inc."); SET ("java.vendor.url", "http://gcc.gnu.org/java/"); SET ("java.class.version", "46.0"); @@ -380,7 +380,7 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops) SET ("java.vm.version", __VERSION__); SET ("java.vm.vendor", "Free Software Foundation, Inc."); SET ("java.vm.name", "GNU libgcj"); - SET ("java.specification.version", "1.4"); + SET ("java.specification.version", JV_API_VERSION); SET ("java.specification.name", "Java(tm) Platform API Specification"); SET ("java.specification.vendor", "Sun Microsystems Inc."); @@ -569,30 +569,6 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops) } #endif - if (_Jv_Jar_Class_Path) - newprops->put(JvNewStringLatin1 ("java.class.path"), - JvNewStringLatin1 (_Jv_Jar_Class_Path)); - else - { - // FIXME: find libgcj.zip and append its path? - char *classpath = ::getenv("CLASSPATH"); - jstring cp = newprops->getProperty (JvNewStringLatin1("java.class.path")); - java::lang::StringBuffer *sb = new java::lang::StringBuffer (); - - if (classpath) - { - sb->append (JvNewStringLatin1 (classpath)); - sb->append (_Jv_platform_path_separator); - } - if (cp != NULL) - sb->append (cp); - else - sb->append ((jchar) '.'); - - newprops->put(JvNewStringLatin1 ("java.class.path"), - sb->toString ()); - } - // The name used to invoke this process (argv[0] in C). SET ("gnu.gcj.progname", _Jv_GetSafeArg (0)); -- cgit v1.1