aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/Runtime.java
AgeCommit message (Collapse)AuthorFilesLines
2003-07-21Runtime.java: Comment fix.Tom Tromey1-2/+2
* java/lang/Runtime.java: Comment fix. * java/lang/ClassLoader.java (isAncestorOf): New method. (getParent): Uncommented security check. Use isAncestorOf. * include/jvm.h (_Jv_CheckAccess): Declare. * java/lang/reflect/natConstructor.cc (newInstance): Perform access check. Include IllegalAccessException.h, ArrayIndexOutOfBoundsException.h. * java/lang/reflect/natArray.cc (newInstance): Pass caller's class loader to _Jv_GetArrayClass. Include ArrayIndexOutOfBoundsException.h. * java/lang/reflect/Field.java: Update comment to reflect status. (equals): Fixed indentation. * java/lang/Class.h (Class): Declare memberAccessCheck, not checkMemberAccess. Make _Jv_CheckAccess a friend. * java/lang/Class.java (memberAccessCheck): New method from Classpath. (checkMemberAccess): Removed. (getDeclaredMethod): Use memberAccessCheck. (getField): Likewise. (getMethod): Likewise. * resolve.cc (_Jv_ResolvePoolEntry): Use _Jv_CheckAccess. (_Jv_SearchMethodInClass): Likewise. * prims.cc (_Jv_CheckAccess): New function. * jni.cc (_Jv_JNI_FindClass): Use getClassLoaderInternal. (_Jv_JNI_GetAnyFieldID): Likewise. * java/lang/natClass.cc (forName): Use getClassLoaderInternal. (getClassLoader): Added security check. (getConstructor): Call memberAccessCheck. (getDeclaredClasses): Likewise. (getDeclaredField): Likewise. (getDeclaredFields): Likewise. (_getConstructors): Likewise. (getDeclaredConstructor): Likewise. (getDeclaredMethods): Likewise. (getFields): Likewise. (getMethods): Likewise. (newInstance): Likewise. (_Jv_MakeVTable): Put method name in exception. * java/lang/reflect/natMethod.cc (getType): Use getClassLoaderInternal. (_Jv_GetTypesFromSignature): Likewise. (invoke): Perform access check. (_Jv_CallAnyMethodA): Removed old FIXME comments. Include ArrayIndexOutOfBoundsException.h. * java/lang/reflect/natField.cc (getType): Use getClassLoaderInternal. (_Jv_CheckFieldAccessibility): Removed. (getAddr): Use _Jv_CheckAccess; find caller. Include ArrayIndexOutOfBoundsException.h. From-SVN: r69621
2002-08-14Fix for PR libgcj/7570 and PR libgcj/7578:Jesse Rosenstock1-8/+2
2002-08-13 Jesse Rosenstock <jmr@ugcs.caltech.edu> Fix for PR libgcj/7570 and PR libgcj/7578: * java/lang/natPosixProcess.cc: Include java/io/File.h. (startProcess): Handle new `dir' argument. * java/lang/Win32Process.java (ConcreteProcess): Added `dir' argument. * java/lang/PosixProcess.java (ConcreteProcess): Added `dir' argument. (startProcess): Likewise. * java/lang/EcosProcess.java (ConcreteProcess): Added `dir' argument. * java/lang/Runtime.java (execInternal): Added `dir' argument. (exec): Don't create new environment if ENV==null. Pass DIR to execInternal. * java/lang/natRuntime.cc: Include java/io/File.h. (execInternal): Added `dir' argument. From-SVN: r56268
2002-07-24Runtime.java (loadLibrary): Pass `true' as search argument to _load.Tom Tromey1-1/+1
* java/lang/Runtime.java (loadLibrary): Pass `true' as search argument to _load. From-SVN: r55727
2002-05-13re PR libgcj/6389 (System.getProperty("") should always throw an ↵Tom Tromey1-87/+725
IllegalArgumentException) Fixes PR libgcj/6389: * Makefile.in: Rebuilt. * Makefile.am (nat_source_files): Added natTimeZone.cc. * java/util/natTimeZone.cc: New file. * java/util/TimeZone.java (getDefaultTimeZoneId): New method. * java/lang/System.java: Merged with Classpath. * java/lang/Runtime.java: Merged with Classpath. * java/lang/natSystem.cc (setErr0): Renamed from setErr; don't run security check. (setIn0): Renamed from setIn; don't run security check. (setOut0): Renamed from setOut; don't run security check. (file_encoding, getpwuid_adaptor, getSystemTimeZone, init_properties): Moved to natRuntime.cc. Moved many includes to natRuntime.cc. (isWordsBigEndian): New method. * java/lang/natRuntime.cc: Include Long.h, also other includes previously in natSystem.cc. (maxMemory): New function. (exitInternal): Renamed from `_exit'. (exit): Removed. (init): Don't set finalize_on_exit. (exitInternal): Use `finalizeOnExit'. (file_encoding, getpwuid_adaptor): New functions from natSystem.cc. (insertSystemProperties): New method, renamed from System::init_properties. Don't set user.timezone. (_load): Don't call checkLink. (execInternal): New method. (availableProcessors): Likewise. (nativeGetLibname): Likewise. From-SVN: r53429
2001-03-12Runtime.java (_exit): Declare new package-private native.Bryce McKinlay1-1/+5
2001-03-12 Bryce McKinlay <bryce@albatross.co.nz> * java/lang/Runtime.java (_exit): Declare new package-private native. * java/lang/natRuntime.cc (_exit): Implemented. Same as exit() but without a security manager check. (exit): Call _exit after security check. * prims.cc (JvRunMain): Call Runtime._exit to shutdown the runtime "naturally". * java/lang/System.java (setSecurityManager): If a security manager is already in place, call checkPermission. * java/lang/ThreadGroup.java (uncaughtException): If printStackTrace() throws an exception, try to deal with it gracefully. * java/lang/ExceptionInInitializerError.java (printStackTrace): Only try to print the subordinate stack trace if "exception" is set. Print our class name first. From-SVN: r40401
2000-03-07All files: Updated copyright information.Tom Tromey1-1/+1
* All files: Updated copyright information. * COPYING: New file. * COPYING.LIB: Removed. * LIBGCJ_LICENSE: We now use GPL + special exception. From-SVN: r32387
2000-02-08Runtime.java (_load): Declare.Tom Tromey1-4/+12
* java/lang/Runtime.java (_load): Declare. (load, loadLibrary): Wrote in terms of _load. * java/lang/natRuntime.cc (load): Call JNI_OnLoad if it appears in library. (loadLibrary): Likewise. Include <jni.h>. (_load): New method. (loadLibrary, load): Removed. From-SVN: r31846
2000-01-19* All files: Updated copyright to reflect Cygnus purchase.Tom Tromey1-1/+1
From-SVN: r31504
2000-01-17Runtime.java (loadLibraryInternal): Declare.Tom Tromey1-1/+7
* java/lang/Runtime.java (loadLibraryInternal): Declare. * java/lang/natClassLoader.cc (_Jv_FindClass): Removed dead copy. (_Jv_FindClassInCache): Likewise. (_Jv_FindClass): Don't conditionalize body on INTERPRETER. (findSystemClass): Try to load class from compiled module. Include Runtime.h. * java/lang/natRuntime.cc (load): Use UTF-8 copy of filename. (loadLibrary): Likewise. (lt_preloaded_symbols): Define. (loadLibraryInternal): New method. * include/config.h.in: Rebuilt. * acconfig.h (USE_LTDL): Added. * Makefile.am (SUBDIRS): Added $(DIRLTDL). (INCLUDES): Added $(INCLTDL).b (libgcj_la_DEPENDENCIES): Added $(LIBLTDL). (libgcj_la_LIBADD): Likewise. * aclocal.m4, configure: Rebuilt. * configure.in: Added libltdl support. From-SVN: r31472
1999-06-09Runtime.java (exec): Convert prog name and arguments to string array.Bryce McKinlay1-5/+6
* java/lang/Runtime.java (exec): Convert prog name and arguments to string array. * java/lang/natPosixProcess.cc (startProcess): Fix typo in environment array conversion. Preserve current environment if envp not passed. Preserve PATH unless explicitly specified. * java/io/DataInputStream.java (readLine): Fix case where '\r' is followed by EOF. Set a flag when a line is terminated by '\r' and ignore following '\n' if set. From-SVN: r27458
1999-05-12javaprims.h: Updated namespace declarations.Tom Tromey1-2/+1
* include/javaprims.h: Updated namespace declarations. * classes.pl (scan): Uniquify class list. * Makefile.in, configure: Rebuilt. * Makefile.am (nat_source_files): Added natConcreteProcess.cc. (built_java_source_files): New macro. (nat_headers): Added built_java_source_files. (javao_files): Likewise. (EXTRA_libgcj_la_SOURCES): Likewise. (libgcj.zip): Create built class files. ($(built_java_source_files:.java=.class)): New target. (jv_convert_LDADD): Added -L$(here)/.libs. * configure.in: Create links for ConcreteProcess.java and natConcreteProcess.cc. * java/lang/Runtime.java (exec): Create a ConcreteProcess. * java/lang/natEcosProcess.cc: New file. * java/lang/EcosProcess.java: New file. * java/lang/PosixProcess.java: New file. * java/lang/natPosixProcess.cc: New file. From-SVN: r26901
1999-05-05Makefile.in: Rebuilt.Tom Tromey1-13/+6
* Makefile.in: Rebuilt. * Makefile.am (CLEANFILES): Don't mention $(class_files). (clean-local): New target * java/lang/natRuntime.cc: Include <ltdl.h> if required. (load, loadLibrary): Now native. (init): New method. * java/lang/Runtime.java (load, loadLibrary): Now native. (init): New native method. (Runtime): Use init. * prims.cc: Include <ltdl.h> if required. (JvRunMain): Call LTDL_SET_PRELOADED_SYMBOLS. From-SVN: r26785
1999-04-07Initial revisionTom Tromey1-0/+136
From-SVN: r26263