From owner-freebsd-java@FreeBSD.ORG Sat Mar 29 14:53:54 2008 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B52BD106566C for ; Sat, 29 Mar 2008 14:53:54 +0000 (UTC) (envelope-from freebsd@spatula.net) Received: from turing.morons.org (turing.morons.org [208.96.51.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8B7F08FC13 for ; Sat, 29 Mar 2008 14:53:54 +0000 (UTC) (envelope-from freebsd@spatula.net) Received: from localhost (localhost.morons.org [127.0.0.1]) by turing.morons.org (Postfix) with ESMTP id C3A32170DA; Sat, 29 Mar 2008 07:53:53 -0700 (PDT) X-DomainKeys: Sendmail DomainKeys Filter v0.6.0 turing.morons.org C3A32170DA DomainKey-Signature: a=rsa-sha1; s=selector1; d=spatula.net; c=nofws; q=dns; h=date:from:to:cc:subject:in-reply-to:message-id:references; b=cuO3OqVya46sfqo/8nx9kxKB2BNnAxyjljG0A0bc11Vl56848/bbYt3wqd2yOTs03 cibvJoP5Eesi4JrS3UtsaW6wz93YnhHYNoE1MtSVnXZbpip5oUfA6bN16MycFd0T8JS Dg2ZQ57zMzJq1ErUANDQDDipJJpRWKXgOrD9Kq4= X-DKIM: Sendmail DKIM Filter v2.4.2 turing.morons.org C3A32170DA DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=spatula.net; s=selector1; t=1206802433; bh=2PH2HJ5RKj7MK/UPeU8f2j1sb9c=; h=X-Virus-Scanned:Date:From:X-X-Sender:To:cc:Subject:In-Reply-To: Message-ID:References:MIME-Version:Content-Type; b=PPS9ooQM8zGFRvp xheqWexVB0qUIqiD/M1uZjqvZUoshBnHrs/GUbjXZaLyBry8Jh7ESIdTK5BbxbaCMWE P6A2zwo5Ymq8b1BqD1VmDZBSgkmzUMrYwdLv3ZbtLlZ5YoCcx4rUq+a0MGH1lnd4ln8 9VRgfAeMScl6+WEqAFylgA= X-Virus-Scanned: amavisd-new at morons.org Received: from turing.morons.org ([127.0.0.1]) by localhost (turing.morons.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3i+f4WcE4ec3; Sat, 29 Mar 2008 07:53:52 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by turing.morons.org (Postfix) with ESMTP; Sat, 29 Mar 2008 07:53:52 -0700 (PDT) Date: Sat, 29 Mar 2008 07:53:52 -0700 (PDT) From: Nick Johnson X-X-Sender: spatula@turing To: Rod In-Reply-To: Message-ID: <20080329075205.A2617@turing> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-java@freebsd.org Subject: Re: Is JNI (Java Native Interface) Known to Work in Both Directions on FreeBSD (to invoke the JVM from native software)? X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2008 14:53:54 -0000 Yeah, it works. Take a look at jsvc that ships with Tomcat 6. It binds to a port, drops root permission and creates a JVM and does back and forth communication with Tomcat. Nick On Sat, 29 Mar 2008, Rod wrote: > I'm having trouble using JNI software on FreeBSD. > In summary: > - I'm able to call native routines from a Java VM via JNI > - However in the other direction JNI seems not to work. I can't create a JVM > via JNI from native software. > Admittedly, I'm using one specific software (R with rJava) and haven't tried > running my own JNI software. > > What I'm noticing is that a call to JNI_CreateJavaVM () in > /usr/local/jdk1.6.0/jre/lib/i386/client/libjvm.so results in SIGSYS, Bad > Sytem Call. > > Here's my output from running R with rJava under gdb with a stack backtrace. > It all seems to go pear-shaped at JNI_CreateJavaVM () : > -- "Courage isn't just a matter of not being frightened, you know. It's being afraid and doing what you have to do anyway." Doctor Who - Planet of the Daleks This message has been brought to you by Nick Johnson 2.3b1 and the number 6. http://healerNick.com/ http://morons.org/ http://spatula.net/