Hi Fabio,

I'll answer this properly off list. From the looks of it, you have a configuration problem. The VM can't find the JamVM versions of the VM classes (VMThread, etc.) and has picked up the default Classpath version of VMThread, which doesn't have the vmData field. It expects to find them in /usr/local/share/jamvm. If you put them somewhere else you need to override the default location at build time.

Rob.

----Original Message Follows----
From: "Fabio Antonini" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: help on classpath on ppc 405
Date: Mon, 07 Jun 2004 13:58:33 +0200

Hi all
my name is Fabio Antonini and since the last week I'm evaluating classpath
with jamvm. I'm trying to cross-compile the classpath/jamvm for a ppc405
from a i686 linux based host. When I run the jamvm on a simple hello world
class file I receive the following message

sh-2.04#  /usr/local/bin/jamvm -verbose -verbosegc -noasyncgc hello
[Linking class java/lang/Object]
[Linking class java/io/Serializable]
[Loaded /usr/local/classpath/share/classpath/java/lang/Class.class]
[Linking class java/lang/Class]
[Loaded /usr/local/classpath/share/classpath/java/io/Serializable.class]
[Loaded /usr/local/classpath/share/classpath/java/lang/Class.class]
[Loaded /usr/local/classpath/share/classpath/java/lang/Object.class]
[Loaded /usr/local/classpath/share/classpath/java/lang/Runnable.class]
[Linking class java/lang/Runnable]
[Loaded /usr/local/classpath/share/classpath/java/lang/Thread.class]
[Linking class java/lang/Thread]
[Loaded /usr/local/classpath/share/classpath/java/lang/VMThread.class]
[Linking class java/lang/VMThread]
Error initialising VM (initialiseMainThread

Digging into the code with lots of printf I've seen that the problem arises
inside the initialiseMainThread function when the VM tries to read some
parameters from the class

thread_class = findSystemClass0("java/lang/Thread");

vmThread = findField(thread_class, "vmThread", "Ljava/lang/VMThread;");
daemon = findField(thread_class, "daemon", "Z");
name = findField(thread_class, "name", "Ljava/lang/String;");
group = findField(thread_class, "group", "Ljava/lang/ThreadGroup;");
priority = findField(thread_class, "priority", "I");

run = findMethod(thread_class, "run", "()V");

vmthread_class = findSystemClass0("java/lang/VMThread");
thread = findField(vmthread_class, "thread", "Ljava/lang/Thread;");
vmData = findField(vmthread_class, "vmData", "I");
printf("Hello from Fabio\n");
/* findField and findMethod do not throw an exception... */
if((vmData == NULL) || (run == NULL) || (daemon == NULL) || (name == NULL)
||
    (group == NULL) || (priority == NULL) || (vmThread == NULL) || (thread
== NULL))

Any idea about this? Could this be related to the different endianess
between the target and host processors?
Any help will be appreciated.
Thank you in advance
Fabio

Fabio Antonini
Kasko Networks S.r.l.
Via Patini 46, 67100 L'Aquila (ITALY)
SW Designer
ph: +3986265562, fax: +3986265562
email: [EMAIL PROTECTED], [EMAIL PROTECTED]



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/classpath

_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to