System.c revision 2884
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include <string.h>
#include "jni.h"
#include "jni_util.h"
#include "jvm.h"
#include "java_props.h"
#include "java_lang_System.h"
/* Only register the performance-critical methods */
static JNINativeMethod methods[] = {
};
{
}
{
return JVM_IHashCode(env, x);
}
if (1) { \
} else ((void) 0)
/* "key" is a char type string with only ASCII character in it.
"val" is a nchar (typedefed in java_props.h) type string */
if (1) { \
} else ((void) 0)
if (1) { \
} else ((void) 0)
if (1) { \
} else ((void) 0)
#ifndef VENDOR /* Third party may overwrite this. */
#define VENDOR "Oracle Corporation"
#define VENDOR_URL "http://java.oracle.com/"
#endif
#define JAVA_MAX_SUPPORTED_VERSION 51
#define JAVA_MAX_SUPPORTED_MINOR_VERSION 0
#ifdef JAVA_SPECIFICATION_VENDOR /* Third party may NOT overwrite this. */
#error "ERROR: No override of JAVA_SPECIFICATION_VENDOR is allowed"
#else
#define JAVA_SPECIFICATION_VENDOR "Oracle Corporation"
#endif
static int fmtdefault; // boolean value
char *platformDispVal, char *platformFmtVal,
if (jVMBaseVal) {
// user specified the base property. there's nothing to do here.
} else {
char buf[64];
const char *baseVal = "";
/* user.xxx base property */
if (fmtdefault) {
if (platformFmtVal) {
}
} else {
if (platformDispVal) {
}
}
/* user.xxx.display property */
}
} else {
}
/* user.xxx.format property */
}
} else {
}
}
return NULL;
}
{
char buf[128];
"put",
"remove",
"getProperty",
"Java Platform API Specification");
if (sprops->awt_toolkit) {
}
/* os properties */
/* file system properties */
/*
* user.language
* user.country, user.variant (if user's environment specifies them)
* file.encoding
* file.encoding.pkg
*/
}
}
/* unicode_encoding specifies the default endianness */
/* !!! DO NOT call PUTPROP_ForPlatformNString before this line !!!
* !!! I18n properties have not been set up yet !!!
*/
/* Printing properties */
/* Note: java.awt.printerjob is an implementation private property which
* just happens to have a java.* name because it is referenced in
* a java.awt class. It is the mechanism by which the implementation
* finds the appropriate class in the JRE for the platform.
* It is explicitly not designed to be overridden by clients as
* a way of replacing the implementation class, and in any case
* the mechanism by which the class is loaded is constrained to only
* find and load classes that are part of the JRE.
* This property may be removed if that mechanism is redesigned
*/
/* data model */
if (sizeof(sprops) == 4) {
} else if (sizeof(sprops) == 8) {
} else {
}
sprops->data_model);
/* patch level */
/* Java2D properties */
/* Note: java.awt.graphicsenv is an implementation private property which
* just happens to have a java.* name because it is referenced in
* a java.awt class. It is the mechanism by which the implementation
* finds the appropriate class in the JRE for the platform.
* It is explicitly not designed to be overridden by clients as
* a way of replacing the implementation class, and in any case
* the mechanism by which the class is loaded is constrained to only
* find and load classes that are part of the JRE.
* This property may be removed if that mechanism is redesigned
*/
}
/* This is a sun. property as it is currently only set for Gnome and
* Windows desktops.
*/
}
/*
* unset "user.language", "user.country", and "user.variant"
* in order to tell whether the command line option "-DXXXX=YYYY" is
* specified or not. They will be reset in fillI18nProps() below.
*/
/* Check the compatibility flag */
if (jVMVal) {
}
/* reconstruct i18n related properties */
if (fmtdefault) {
} else {
}
} else {
}
return ret;
}
/*
* The following three functions implement setter methods for
* java.lang.System.{in, out, err}. They are natively implemented
* because they violate the semantics of the language (i.e. set final
* variable).
*/
{
if (fid == 0)
return;
}
{
if (fid == 0)
return;
}
{
if (fid == 0)
return;
}
{
int i;
for (i = 0; i < n; i++) {
}
}
{
int len;
return NULL;
}
if (len > 240) {
return NULL;
}
len += prefix_len;
len += suffix_len;
}