This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Weird segmentation fault (2)


Apparently this works :

#include <gcj/cni.h>

extern char **_Jv_argv;
extern int _Jv_argc;

int main(int argc, char *argv[])
{
    _Jv_argc = argc;
    _Jv_argv = argv;
    JvCreateJavaVM(argv[0]);
    JvAttachCurrentThread(NULL, NULL);

JvDetachCurrentThread();

    return 0;
}

So it could maybe be included as testcase.

Best regards,

Geert

--
Geert Bevin                       Uwyn
"Use what you need"               Lambermontlaan 148
http://www.uwyn.com               1030 Brussels
gbevin[remove] at uwyn dot com    Tel & Fax +32 2 245 41 06

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]