According to comment in java/lang/System.java these properties must be set. Otherwise we might experience NullPointerExceptions in programs that expect those properties to be set.
The only required properties which are missing are: 'java.class.path' and 'java.home'. Signed-off-by: Tomek Grabiec <tgrab...@gmail.com> --- vm/jato.c | 33 +++++++++++++++++++++++++++------ 1 files changed, 27 insertions(+), 6 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index aaaa553..6b4bcdd 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -34,6 +34,7 @@ #include <string.h> #include <sys/types.h> #include <sys/stat.h> +#include <sys/utsname.h> #include <time.h> #include <unistd.h> @@ -190,12 +191,25 @@ struct system_property { }; static struct system_property system_properties[] = { - { "java.vm.name", "jato" }, - { "java.io.tmpdir", "/tmp" }, - { "file.separator", "/" }, - { "path.separator", ":" }, - { "line.separator", "\n" }, - { "os.name", "Linux" }, + { "java.vm.name", "jato" }, + { "java.vm.vendor", "Pekka Enberg" }, + { "java.vm.vendor.url", "http://jatovm.sourceforge.net/"}, + { "java.io.tmpdir", "/tmp" }, + { "file.separator", "/" }, + { "path.separator", ":" }, + { "line.separator", "\n" }, + { "java.version", "1.4" }, + { "java.vendor", "GNU Classpath" }, + { "java.vendor.url", "http://www.classpath.org" }, + { "java.vm.specification.version", "1.0" }, + { "java.vm.specification.vendor", "Sun Microsystems, Inc." }, + { "java.vm.specification.name", "Java Virtual Machine Specification"}, + { "java.specification.version", "1.4" }, + { "java.specification.vendor", "Sun Microsystems, Inc." }, + { "java.specification.name", "Java Platform API Specification"}, + { "java.class.version", "48.0" }, + { "java.compiler", "jato" }, + { "java.ext.dirs", "" }, }; /* @@ -225,6 +239,13 @@ static void init_system_properties(void) add_system_property_const("user.name", getenv("USER")); add_system_property_const("user.home", getenv("HOME")); + + struct utsname info; + + uname(&info); + add_system_property_const("os.arch", ARCH_NAME); + add_system_property_const("os.name", info.sysname); + add_system_property_const("os.version", info.release); } static void native_vmsystemproperties_preinit(struct vm_object *p) -- 1.6.0.6 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel