This is a requirement of GNU classpath (otherwise we crash with a
NullPointerException).

Signed-off-by: Vegard Nossum <vegard.nos...@gmail.com>
---
 vm/jato.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/vm/jato.c b/vm/jato.c
index 565754c..f7838ba 100644
--- a/vm/jato.c
+++ b/vm/jato.c
@@ -68,6 +68,16 @@ static struct vm_object *__vm_native 
native_vmstackwalker_getclasscontext(void)
 
 static void __vm_native native_vmsystemproperties_preinit(struct vm_object *p)
 {
+       struct vm_object *key = vm_object_alloc_string_from_c("java.vm.name");
+       struct vm_object *value = vm_object_alloc_string_from_c("jato");
+
+       struct vm_object *(*trampoline)(struct vm_object *,
+               struct vm_object *, struct vm_object *);
+
+       trampoline
+               = vm_method_trampoline_ptr(vm_java_util_Properties_setProperty);
+
+       trampoline(p, key, value);
 }
 
 static void __vm_native native_vmruntime_exit(int status)
-- 
1.6.0.4


------------------------------------------------------------------------------
_______________________________________________
Jatovm-devel mailing list
Jatovm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Reply via email to