From owner-freebsd-java@FreeBSD.ORG Mon Dec 19 14:57:36 2011 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 F34761065670 for ; Mon, 19 Dec 2011 14:57:36 +0000 (UTC) (envelope-from info@o-notation.org) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id 888D98FC12 for ; Mon, 19 Dec 2011 14:57:36 +0000 (UTC) Received: from kant.vitec-loesung.de (p5DC93648.dip.t-dialin.net [93.201.54.72]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0Lzna3-1Qgkc328ix-014WgT; Mon, 19 Dec 2011 15:45:00 +0100 Received: from [10.0.0.46] (sprawl.vitec-loesung.de [10.0.0.46]) by kant.vitec-loesung.de (Postfix) with ESMTP id 9176B2A23E for ; Mon, 19 Dec 2011 15:42:41 +0100 (CET) Message-ID: <4EEF4D5F.4090508@o-notation.org> Date: Mon, 19 Dec 2011 15:42:39 +0100 From: Matthias User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-java@freebsd.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:rX7bbtTovixtBeUdEb+Vnr33T3mmR7JK+a7mA9mIMr0 SV257j612UNAEY7U5ysT0C3a5uXZYlj0gFe3YxDwiln+cYR4/x Ux3DpDJe150FValiTqCJKFdGJLTWRF/AvbUfx8coPnKTBkE4vE 6m31kiEHS1pQQd5wQFwlP+pbkMc6uey5ncSznclficdUBYhoxO /XGYC/fymPa3Ekl1aLSjri/xKE5RFNFD6X1v28FLQgPFue9upV sQ+MitU7SVH5A8bIHTg+kiZoJFXgQfuzSFYRLEd1hOTjjK3cIT D1qXT/dNk5V70F/2spPPl9RiY9zspyK5JZyosjTVPv40GGWY+c cTJNS+JHIf2UTXIgtM+w= Subject: openjdk and jni 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: Mon, 19 Dec 2011 14:57:37 -0000 Hello group, for a project i try to port the JNotify lib to FreeBSD. I use the kevents to get the file events; i put it in a jni-lib: There is add-Method to register the event with path and eventmask(blocking mode), returning the filehandle. By registering the event i add a struct to kevent.udate for additional information(fh, mask, path). A callback-method is called from jni-lib with values of the kevent.udata-struct, when a event is fired. That's the idea... The Problem: When i register different paths directly via the Java-Jni-Wrapper-Class, every event is fired and i get all the values of the callback-method. When i register the same paths via the JNotify-wrapper-class->Java-Jni-Wrapper-Class, the events are fired too, but the values of the callback-method are totally wrong(not the values of the first registered event). All parameters showing nonsens. Tests are showing, that the values of the struct returned by the kevent are already bad. Are there any limitations of openjdk and jni? Why is it running fine when using the java-jni-class and using a wrapper-class the results are nonsens? Any hints are welcome... Matthias