natSystem.cc (init_properties): Change sourceware reference to sources.redhat.com.

Sun Aug 20 21:02:48 2000  Anthony Green  <green@redhat.com>

	* java/lang/natSystem.cc (init_properties): Change sourceware
	reference to sources.redhat.com.

	* include/java-props.h: Add _Jv_Jar_Class_Path.
	* prims.cc: Ditto.  Set it from	`gij -jar file' option.

	* java/lang/natSystem.cc (init_properties): Set java.class.path
	from
	{gij -jar file}:{CLASSPATH variable}:{-Djava.class.path= or .}

	* java/util/PropertyPermission.java: Import from GNU Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am: Add java/util/PropertyPermission.java.
	* java/lang/System.java: Add setProperty method.

	* gij.cc (main): Add -jar option to execute jar files.
	(help): Describe -jar option.
	* prims.cc (_Jv_RunMain): Add support for jar execution mode.
	* gnu/gcj/tools/Gij.java: New file.
	* include/jvm.h: Add is_jar argument to _Jv_RunMain.
	* gnu/gcj/runtime/FirstThread.java (main): New method.

	* java/util/jar/Attributes.java: Correct comment spelling.

From-SVN: r35829
This commit is contained in:
Anthony Green 2000-08-21 06:05:20 +00:00
parent b485e15bf8
commit 1a558147d1
12 changed files with 386 additions and 25 deletions

View file

@ -32,6 +32,7 @@ details. */
#include <java/lang/ArrayStoreException.h>
#include <java/lang/ArrayIndexOutOfBoundsException.h>
#include <java/lang/NullPointerException.h>
#include <java/lang/StringBuffer.h>
#include <java/util/Properties.h>
#include <java/io/PrintStream.h>
#include <java/io/InputStream.h>
@ -216,7 +217,7 @@ java::lang::System::init_properties (void)
// (introduced in 1.2), and earlier versioning properties.
SET ("java.version", VERSION);
SET ("java.vendor", "Free Software Foundation");
SET ("java.vendor.url", "http://sourceware.cygnus.com/java/");
SET ("java.vendor.url", "http://sources.redhat.com/java/");
SET ("java.class.version", GCJVERSION);
SET ("java.vm.specification.version", "1.1");
SET ("java.vm.specification.name", "Java(tm) Virtual Machine Specification");
@ -263,13 +264,6 @@ java::lang::System::init_properties (void)
}
#endif /* HAVE_UNAME */
char *classpath = ::getenv("CLASSPATH");
// FIXME: find libgcj.zip and append its path?
if (classpath != NULL)
SET ("java.class.path", classpath);
else
SET ("java.class.path", ".");
#ifndef NO_GETUID
#ifdef HAVE_PWD_H
uid_t user_id = getuid ();
@ -353,4 +347,35 @@ java::lang::System::init_properties (void)
i++;
}
}
// FIXME: find libgcj.zip and append its path?
char *classpath = ::getenv("CLASSPATH");
jstring cp = properties->getProperty (JvNewStringLatin1("java.class.path"));
java::lang::StringBuffer *sb = new java::lang::StringBuffer ();
if (_Jv_Jar_Class_Path)
{
sb->append (JvNewStringLatin1 (_Jv_Jar_Class_Path));
#ifdef WIN32
sb->append ((jchar) ';');
#else
sb->append ((jchar) ':');
#endif;
}
if (classpath)
{
sb->append (JvNewStringLatin1 (classpath));
#ifdef WIN32
sb->append ((jchar) ';');
#else
sb->append ((jchar) ':');
#endif;
}
if (cp != NULL)
sb->append (cp);
else
sb->append ((jchar) '.');
properties->put(JvNewStringLatin1 ("java.class.path"),
sb->toString ());
}