[1510] in java-interest

home help back first fref pref prev next nref lref last post

[owner-java-interest-digest@java.sun.com: java-interest-digest V1 #150]

daemon@ATHENA.MIT.EDU (Jonathan Payne)
Wed Sep 6 15:52:54 1995

Date: Wed, 6 Sep 1995 10:21:32 -0700
From: jpayne@starwave.com (Jonathan Payne)
To: jsw@cs.brown.edu
Cc: java-interest@java.Eng.Sun.COM

    From: Jeff White <jsw@cs.brown.edu>
    Date: Tue, 5 Sep 1995 04:10:19 -0400
    Subject: native methods and ObjAlloc()

    If I want to return an object that has no constructor, I can't use
    execute_java_constructor().  Is ObjAlloc() the correct and sufficient
    thing to use instead of execute_java_constructor() ?  And what is the
    second parameter (I've just been using 0)?

    thanks,
    jeff

I think that execute_java_constructor just calls the constructor on an
already allocated object.  In other words, you must always call
ObjAlloc regardless.

I've always thought the best way to deal with things is to allocate
the objects in Java code, and pass in the Java object to a native
method which just fills it in.  This removes knowledge of how objects
are created and initialized from the native level.

BTW, I could be completely wrong about ObjAlloc and
execute_java_constructor.
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post