From owner-freebsd-java Mon Jul 17 16: 2:34 2000 Delivered-To: freebsd-java@freebsd.org Received: from c187104187.telekabel.chello.nl (c187104187.telekabel.chello.nl [212.187.104.187]) by hub.freebsd.org (Postfix) with SMTP id 1ABA237B564 for ; Mon, 17 Jul 2000 16:02:27 -0700 (PDT) (envelope-from ernst@c187104187.telekabel.chello.nl) Received: (qmail 13196 invoked by uid 1000); 17 Jul 2000 23:02:17 -0000 Date: Tue, 18 Jul 2000 01:02:17 +0200 From: Ernst de Haan To: FreeBSD Java mailing list Subject: Sun Linux JDK 1.3.0b9 runz on FreeBSD 4.0-STABLE ! Message-ID: <20000718010217.A13154@c187104187.telekabel.chello.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline User-Agent: Mutt/1.2i Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi folkz, I have the Sun JDK 1.3.0 for Linux, beta 9 running on my FreeBSD 4.0-STABLE system. Runs pretty nicely too. java -version reports: bash-2.04$ java -version expr: syntax error java version "1.3.0beta_refresh" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0beta_refresh-b09) Classic VM (build 1.3.0beta_refresh-b09, green threads, nojit) The first line with the syntax error is a small problem with .java_wrapper, but it seems harmless. I had to make some modifications to the .java_wrapper script to make it work on my system. I've attached the version I use. I haven't done much testing yet, but I have tried a single Swing application. I did notice some differences in fonts, but it all seems to work pretty nice and fast :) Wow, soon FreeBSD will be the platform with the greatest number of working JDKs on it, once we get WINE to work so we can run the Windows JDKs too, and write an AS/400 emulator, and... and... ;-) Ernst P.S. Thanks go to Victor Salaman how pointed me in the right direction. He has been running the Sun JDK 1.3 for Linux for quite a while. --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=".java_wrapper" #!/bin/sh # # @(#)java_wrapper_linux.sh 1.8 00/05/19 # # Copyright 1994-1998 by Sun Microsystems, Inc., # 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. # All rights reserved. # # This software is the confidential and proprietary information # of Sun Microsystems, Inc. ("Confidential Information"). You # shall not disclose such Confidential Information and shall use # it only in accordance with the terms of the license agreement # you entered into with Sun. # PRG=$0 progname=`basename $0` case "`uname -m`" in i[3-6]86 | ia32 | ia64) proc=i386 ;; sparc*) proc=sparc ;; *) proc="`uname -m`" ;; esac # Resolve symlinks. See 4152645. while [ -L "$PRG" ]; do ls=`/bin/ls -ld "$PRG"` link=`/bin/expr "$ls" : '.*-> \(.*\)$'` if /bin/expr "$link" : '/' > /dev/null; then PRG="$link" else PRG="`/usr/bin/dirname $PRG`/$link" fi done APPHOME=`dirname "$PRG"`/.. JREHOME=$APPHOME/jre # Where is JRE? unset jre if [ -f "${JREHOME}/lib/${proc}/libjava.so" ]; then jre="${JREHOME}" fi if [ -f "${APPHOME}/lib/${proc}/libjava.so" ]; then jre="${APPHOME}" fi if [ "x${jre}" = "x" ]; then echo "Error: can't find libjava.so." exit 1 fi # Get the canonicalized absolute pathnames jre="`$jre/bin/realpath $jre`" APPHOME="`${jre}/bin/realpath $APPHOME`" JREHOME="`${jre}/bin/realpath $JREHOME`" export APPHOME JREHOME # Select vm type ttype=native_threads if grep "^$1\$" ${jre}/lib/jvm.cfg > /dev/null; then # User specified some VM type known to jvm.cfg. vmtype=`echo $1 | /usr/bin/cut -c 2-` else # User didn't specify a VM type, see if default is classic. default=`grep -v '^#' "${jre}/lib/jvm.cfg" | /usr/bin/head -1` vmtype=`echo ${default} | /usr/bin/cut -c 2-` fi if [ "${vmtype}" = "classic" ]; then ttype=green_threads LD_BIND_NOW=yes export LD_BIND_NOW _JVM_THREADS_TYPE=green_threads export _JVM_THREADS_TYPE fi # If jre is in a jre subdir, include parent dir libraries in lib path. This # needs to be cleaned up because -Xrun libraries are the ones that need it. if [ "${jre}" = "$JREHOME" ]; then JAVA_LIBRARY_PATH=":${jre}/../lib/${proc}" fi # Set LD_LIBRARY_PATH for libjvm.so (necessitated by ld.so bugid 4176579) JAVA_LIBRARY_PATH="${jre}/lib/${proc}/${vmtype}$JAVA_LIBRARY_PATH" # Set LD_LIBRARY_PATH to find libawt.so etc. JAVA_LIBRARY_PATH="${jre}/lib/${proc}:${jre}/lib/${proc}/${ttype}/:${JAVA_LIBRARY_PATH}" LD_LIBRARY_PATH="${JAVA_LIBRARY_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" export LD_LIBRARY_PATH prog="$APPHOME/bin/${proc}/${ttype}/${progname}" # Run. if [ -x "$prog" ] then # Calling: exec $DEBUG_PROG "$prog" "$@" exec $DEBUG_PROG "$prog" "$@" else echo >&2 "$progname was not found in ${prog}" exit 1 fi --M9NhX3UHpAaciwkO-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Mon Jul 17 16:11:22 2000 Delivered-To: freebsd-java@freebsd.org Received: from c187104187.telekabel.chello.nl (c187104187.telekabel.chello.nl [212.187.104.187]) by hub.freebsd.org (Postfix) with SMTP id DC6B537B701 for ; Mon, 17 Jul 2000 16:11:13 -0700 (PDT) (envelope-from ernst@c187104187.telekabel.chello.nl) Received: (qmail 13367 invoked by uid 1000); 17 Jul 2000 23:11:08 -0000 Date: Tue, 18 Jul 2000 01:11:08 +0200 From: Ernst de Haan To: FreeBSD Java mailing list Subject: Re: Sun Linux JDK 1.3.0b9 runz on FreeBSD 4.0-STABLE ! Message-ID: <20000718011107.A13335@c187104187.telekabel.chello.nl> References: <20000718010217.A13154@c187104187.telekabel.chello.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000718010217.A13154@c187104187.telekabel.chello.nl>; from ernst@jollem.com on Tue, Jul 18, 2000 at 01:02:17AM +0200 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Just one more hint: Change the jre/lib/jvm.cfg and put the last line on top. So you will get: -classic -hotspot -server I _do_ get one warning, BTW, when running the Swing app: Warning: Cannot convert string "MetaCtrlInsert" to type VirtualBinding Ernst Ernst de Haan wrote: > Hi folkz, > > I have the Sun JDK 1.3.0 for Linux, beta 9 running on my FreeBSD > 4.0-STABLE system. Runs pretty nicely too. > > java -version reports: > > bash-2.04$ java -version > expr: syntax error > java version "1.3.0beta_refresh" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0beta_refresh-b09) > Classic VM (build 1.3.0beta_refresh-b09, green threads, nojit) > > The first line with the syntax error is a small problem with > .java_wrapper, but it seems harmless. I had to make some modifications > to the .java_wrapper script to make it work on my system. I've attached > the version I use. > > I haven't done much testing yet, but I have tried a single Swing > application. I did notice some differences in fonts, but it all seems to > work pretty nice and fast :) > > Wow, soon FreeBSD will be the platform with the greatest number of > working JDKs on it, once we get WINE to work so we can run the Windows > JDKs too, and write an AS/400 emulator, and... and... ;-) > > Ernst > > P.S. Thanks go to Victor Salaman how pointed me in the right direction. > He has been running the Sun JDK 1.3 for Linux for quite a while. > #!/bin/sh > > # > # @(#)java_wrapper_linux.sh 1.8 00/05/19 > # > # Copyright 1994-1998 by Sun Microsystems, Inc., > # 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. > # All rights reserved. > # > # This software is the confidential and proprietary information > # of Sun Microsystems, Inc. ("Confidential Information"). You > # shall not disclose such Confidential Information and shall use > # it only in accordance with the terms of the license agreement > # you entered into with Sun. > # > > PRG=$0 > progname=`basename $0` > case "`uname -m`" in > i[3-6]86 | ia32 | ia64) > proc=i386 > ;; > sparc*) > proc=sparc > ;; > *) > proc="`uname -m`" > ;; > esac > > # Resolve symlinks. See 4152645. > while [ -L "$PRG" ]; do > ls=`/bin/ls -ld "$PRG"` > link=`/bin/expr "$ls" : '.*-> \(.*\)$'` > if /bin/expr "$link" : '/' > /dev/null; then > PRG="$link" > else > PRG="`/usr/bin/dirname $PRG`/$link" > fi > done > > APPHOME=`dirname "$PRG"`/.. > JREHOME=$APPHOME/jre > > # Where is JRE? > unset jre > if [ -f "${JREHOME}/lib/${proc}/libjava.so" ]; then > jre="${JREHOME}" > fi > if [ -f "${APPHOME}/lib/${proc}/libjava.so" ]; then > jre="${APPHOME}" > fi > if [ "x${jre}" = "x" ]; then > echo "Error: can't find libjava.so." > exit 1 > fi > > # Get the canonicalized absolute pathnames > jre="`$jre/bin/realpath $jre`" > APPHOME="`${jre}/bin/realpath $APPHOME`" > JREHOME="`${jre}/bin/realpath $JREHOME`" > export APPHOME JREHOME > > # Select vm type > ttype=native_threads > if grep "^$1\$" ${jre}/lib/jvm.cfg > /dev/null; then > # User specified some VM type known to jvm.cfg. > vmtype=`echo $1 | /usr/bin/cut -c 2-` > else > # User didn't specify a VM type, see if default is classic. > default=`grep -v '^#' "${jre}/lib/jvm.cfg" | /usr/bin/head -1` > vmtype=`echo ${default} | /usr/bin/cut -c 2-` > fi > > if [ "${vmtype}" = "classic" ]; then > ttype=green_threads > LD_BIND_NOW=yes > export LD_BIND_NOW > _JVM_THREADS_TYPE=green_threads > export _JVM_THREADS_TYPE > fi > > > # If jre is in a jre subdir, include parent dir libraries in lib path. This > # needs to be cleaned up because -Xrun libraries are the ones that need it. > if [ "${jre}" = "$JREHOME" ]; then > JAVA_LIBRARY_PATH=":${jre}/../lib/${proc}" > fi > # Set LD_LIBRARY_PATH for libjvm.so (necessitated by ld.so bugid 4176579) > JAVA_LIBRARY_PATH="${jre}/lib/${proc}/${vmtype}$JAVA_LIBRARY_PATH" > > # Set LD_LIBRARY_PATH to find libawt.so etc. > JAVA_LIBRARY_PATH="${jre}/lib/${proc}:${jre}/lib/${proc}/${ttype}/:${JAVA_LIBRARY_PATH}" > > LD_LIBRARY_PATH="${JAVA_LIBRARY_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" > export LD_LIBRARY_PATH > > prog="$APPHOME/bin/${proc}/${ttype}/${progname}" > > # Run. > if [ -x "$prog" ] > then > # Calling: exec $DEBUG_PROG "$prog" "$@" > exec $DEBUG_PROG "$prog" "$@" > else > echo >&2 "$progname was not found in ${prog}" > exit 1 > fi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Tue Jul 18 3:36: 1 2000 Delivered-To: freebsd-java@freebsd.org Received: from c187104187.telekabel.chello.nl (c187104187.telekabel.chello.nl [212.187.104.187]) by hub.freebsd.org (Postfix) with SMTP id 84C2637BD52 for ; Tue, 18 Jul 2000 03:35:44 -0700 (PDT) (envelope-from ernst@c187104187.telekabel.chello.nl) Received: (qmail 13930 invoked by uid 1000); 17 Jul 2000 23:28:58 -0000 Date: Tue, 18 Jul 2000 01:28:58 +0200 From: Ernst de Haan To: FreeBSD Java mailing list Subject: Re: Sun Linux JDK 1.3.0b9 runz on FreeBSD 4.0-STABLE ! Message-ID: <20000718012858.A13914@c187104187.telekabel.chello.nl> References: <20000718010217.A13154@c187104187.telekabel.chello.nl> <20000718011107.A13335@c187104187.telekabel.chello.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000718011107.A13335@c187104187.telekabel.chello.nl>; from ernst@jollem.com on Tue, Jul 18, 2000 at 01:11:08AM +0200 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline After some discussion with Victor, here's the fix to make the .java_wrapper file work without the error message: Change every occurrence of a call to expr to /usr/compat/linux/usr/bin/expr. I've attached the new file. Ernst Ernst de Haan wrote: > Just one more hint: Change the jre/lib/jvm.cfg and put the last line on > top. So you will get: > > -classic > -hotspot > -server > > I _do_ get one warning, BTW, when running the Swing app: > > Warning: Cannot convert string "MetaCtrlInsert" to type VirtualBinding > > Ernst > > > Ernst de Haan wrote: > > Hi folkz, > > > > I have the Sun JDK 1.3.0 for Linux, beta 9 running on my FreeBSD > > 4.0-STABLE system. Runs pretty nicely too. > > > > java -version reports: > > > > bash-2.04$ java -version > > expr: syntax error > > java version "1.3.0beta_refresh" > > Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0beta_refresh-b09) > > Classic VM (build 1.3.0beta_refresh-b09, green threads, nojit) > > > > The first line with the syntax error is a small problem with > > .java_wrapper, but it seems harmless. I had to make some modifications > > to the .java_wrapper script to make it work on my system. I've attached > > the version I use. > > > > I haven't done much testing yet, but I have tried a single Swing > > application. I did notice some differences in fonts, but it all seems to > > work pretty nice and fast :) > > > > Wow, soon FreeBSD will be the platform with the greatest number of > > working JDKs on it, once we get WINE to work so we can run the Windows > > JDKs too, and write an AS/400 emulator, and... and... ;-) > > > > Ernst > > > > P.S. Thanks go to Victor Salaman how pointed me in the right direction. > > He has been running the Sun JDK 1.3 for Linux for quite a while. --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=".java_wrapper" #!/bin/sh # # @(#)java_wrapper_linux.sh 1.8 00/05/19 # # Copyright 1994-1998 by Sun Microsystems, Inc., # 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. # All rights reserved. # # This software is the confidential and proprietary information # of Sun Microsystems, Inc. ("Confidential Information"). You # shall not disclose such Confidential Information and shall use # it only in accordance with the terms of the license agreement # you entered into with Sun. # PRG=$0 progname=`basename $0` case "`uname -m`" in i[3-6]86 | ia32 | ia64) proc=i386 ;; sparc*) proc=sparc ;; *) proc="`uname -m`" ;; esac # Resolve symlinks. See 4152645. while [ -L "$PRG" ]; do ls=`/bin/ls -ld "$PRG"` link=`/usr/compat/linux/usr/bin/expr "$ls" : '.*-> \(.*\)$'` if /usr/compat/linux/usr/bin/expr "$link" : '/' > /dev/null; then PRG="$link" else PRG="`/usr/bin/dirname $PRG`/$link" fi done APPHOME=`dirname "$PRG"`/.. JREHOME=$APPHOME/jre # Where is JRE? unset jre if [ -f "${JREHOME}/lib/${proc}/libjava.so" ]; then jre="${JREHOME}" fi if [ -f "${APPHOME}/lib/${proc}/libjava.so" ]; then jre="${APPHOME}" fi if [ "x${jre}" = "x" ]; then echo "Error: can't find libjava.so." exit 1 fi # Get the canonicalized absolute pathnames jre="`$jre/bin/realpath $jre`" APPHOME="`${jre}/bin/realpath $APPHOME`" JREHOME="`${jre}/bin/realpath $JREHOME`" export APPHOME JREHOME # Select vm type ttype=native_threads if grep "^$1\$" ${jre}/lib/jvm.cfg > /dev/null; then # User specified some VM type known to jvm.cfg. vmtype=`echo $1 | /usr/bin/cut -c 2-` else # User didn't specify a VM type, see if default is classic. default=`grep -v '^#' "${jre}/lib/jvm.cfg" | /usr/bin/head -1` vmtype=`echo ${default} | /usr/bin/cut -c 2-` fi if [ "${vmtype}" = "classic" ]; then ttype=green_threads LD_BIND_NOW=yes export LD_BIND_NOW _JVM_THREADS_TYPE=green_threads export _JVM_THREADS_TYPE fi # If jre is in a jre subdir, include parent dir libraries in lib path. This # needs to be cleaned up because -Xrun libraries are the ones that need it. if [ "${jre}" = "$JREHOME" ]; then JAVA_LIBRARY_PATH=":${jre}/../lib/${proc}" fi # Set LD_LIBRARY_PATH for libjvm.so (necessitated by ld.so bugid 4176579) JAVA_LIBRARY_PATH="${jre}/lib/${proc}/${vmtype}$JAVA_LIBRARY_PATH" # Set LD_LIBRARY_PATH to find libawt.so etc. JAVA_LIBRARY_PATH="${jre}/lib/${proc}:${jre}/lib/${proc}/${ttype}/:${JAVA_LIBRARY_PATH}" LD_LIBRARY_PATH="${JAVA_LIBRARY_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" export LD_LIBRARY_PATH prog="$APPHOME/bin/${proc}/${ttype}/${progname}" # Run. if [ -x "$prog" ] then # Calling: exec $DEBUG_PROG "$prog" "$@" exec $DEBUG_PROG "$prog" "$@" else echo >&2 "$progname was not found in ${prog}" exit 1 fi --KsGdsel6WgEHnImy-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Tue Jul 18 4:10:14 2000 Delivered-To: freebsd-java@freebsd.org Received: from mimer.webgiro.com (mimer.webgiro.com [212.209.29.5]) by hub.freebsd.org (Postfix) with ESMTP id 04A1337B5C8 for ; Tue, 18 Jul 2000 04:10:08 -0700 (PDT) (envelope-from abial@webgiro.com) Received: by mimer.webgiro.com (Postfix, from userid 66) id 724822DC0B; Tue, 18 Jul 2000 13:15:28 +0200 (CEST) Received: by mx.webgiro.com (Postfix, from userid 1001) id 311FB7817; Tue, 18 Jul 2000 13:05:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mx.webgiro.com (Postfix) with ESMTP id 2C4A010E17; Tue, 18 Jul 2000 13:05:40 +0200 (CEST) Date: Tue, 18 Jul 2000 13:05:40 +0200 (CEST) From: Andrzej Bialecki To: Ernst de Haan Cc: FreeBSD Java mailing list Subject: Re: Sun Linux JDK 1.3.0b9 runz on FreeBSD 4.0-STABLE ! In-Reply-To: <20000718012858.A13914@c187104187.telekabel.chello.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, 18 Jul 2000, Ernst de Haan wrote: > After some discussion with Victor, here's the fix to make the > .java_wrapper file work without the error message: Change every > occurrence of a call to expr to /usr/compat/linux/usr/bin/expr. I've > attached the new file. I should perhaps add that JVM works only in -classic mode. -hotspot and -server JVMs do some magic with altstack (famous "can't uninstall altstack" message) that effectively hangs them. Has anyone tried to use some JIT with it? Andrzej Bialecki // WebGiro AB, Sweden (http://www.webgiro.com) // ------------------------------------------------------------------- // ------ FreeBSD: The Power to Serve. http://www.freebsd.org -------- // --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Tue Jul 18 14:22:19 2000 Delivered-To: freebsd-java@freebsd.org Received: from crowe.surety.com (crowe.surety.com [209.249.186.50]) by hub.freebsd.org (Postfix) with ESMTP id 7639E37B80B for ; Tue, 18 Jul 2000 14:22:17 -0700 (PDT) (envelope-from tom@surety.com) Received: from hicks (hicks.surety.com [209.249.186.217]) by crowe.surety.com (8.9.3/8.9.3) with SMTP id RAA28408; Tue, 18 Jul 2000 17:22:15 -0400 From: "Tom O'Connor" To: Subject: JDK118, C++, pthreads, and JNI Date: Tue, 18 Jul 2000 17:22:25 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I have a C++ library that I am putting a Java wrapper around using JNI. When some objects in the C++ library are created, pthreads are also created and started. I compile the C++ code using g++, and then create the .so with ld, explicitly linking the reentrant C++ runtime, and my other C++ libraries. This is done because the .so wouldn't load, the exception handling symbols were missing. Java calls into my native call and executes until it reaches the method call of an object in the C++ library I'm attempting to wrap that creates and starts some pthreads. At that point, the JVM SEGV's. Is it possible to get JDK118, a pthread'ed C++ library accessed through JNI, on FreeBSD 4.0-20000714-STABLE to play nicely together? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Tue Jul 18 15:54:23 2000 Delivered-To: freebsd-java@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id B878A37BBBF for ; Tue, 18 Jul 2000 15:54:20 -0700 (PDT) (envelope-from nate@yogotech.com) Received: from nomad.yogotech.com (yogotech.nokia.com [4.22.66.156]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id QAA29648; Tue, 18 Jul 2000 16:54:17 -0600 (MDT) (envelope-from nate@nomad.yogotech.com) Received: (from nate@localhost) by nomad.yogotech.com (8.8.8/8.8.8) id QAA07023; Tue, 18 Jul 2000 16:54:07 -0600 (MDT) (envelope-from nate) Date: Tue, 18 Jul 2000 16:54:07 -0600 (MDT) Message-Id: <200007182254.QAA07023@nomad.yogotech.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: "Tom O'Connor" Cc: Subject: Re: JDK118, C++, pthreads, and JNI In-Reply-To: References: X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I have a C++ library that I am putting a Java wrapper around using JNI. When > some objects in the C++ library are created, pthreads are also created and > started. > > I compile the C++ code using g++, and then create the .so with ld, > explicitly linking the reentrant C++ runtime, and my other C++ libraries. > This is done because the .so wouldn't load, the exception handling symbols > were missing. > > Java calls into my native call and executes until it reaches the method call > of an object in the C++ library I'm attempting to wrap that creates and > starts some pthreads. At that point, the JVM SEGV's. > > Is it possible to get JDK118, a pthread'ed C++ library accessed through JNI, > on FreeBSD 4.0-20000714-STABLE to play nicely together? Not very easily, if at all. It would certainly take alot of work, and it's not something I would recommend. It would almost certainly require re-writing either the pthreads internals and/or the green threads internals, since I believe both use the same signals to do the 'threading' internally. Basically, pthreads and the green threads implementation in the JDK are not compatible with one another. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Tue Jul 18 20:26:49 2000 Delivered-To: freebsd-java@freebsd.org Received: from mail.xmission.com (mail.xmission.com [198.60.22.22]) by hub.freebsd.org (Postfix) with ESMTP id EFB8937B84C for ; Tue, 18 Jul 2000 20:26:41 -0700 (PDT) (envelope-from dholland@xmission.com) Received: from [204.228.142.205] (helo=olivaw) by mail.xmission.com with smtp (Exim 3.03 #3) id 13EkVN-0002ls-00 for freebsd-java@FreeBSD.ORG; Tue, 18 Jul 2000 21:26:41 -0600 From: "David Holland" To: Subject: Native and Linux JDK1.2.2 repaint problems under FreeBSD3.5 Date: Tue, 18 Jul 2000 21:33:10 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Importance: Normal Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The other day, I installed the Linux JDK1.2.2 port and built the native JDK1.2.2 using the Kee's instructions on FreeBSD-3.5-Release. Initially, I used XFree86-4.0 (using a 3DFX Voodoo3500 AGP/TV card) and lesstiff. I was surprised to have horrible repaint problems with JBuilder3. With the Linux version, things would only repaint under the mouse or if a window was moved over them, and the native version was only slightly better. (Repaints seem to be JFC pixel based, rather than awt peer based) I had tried similar steps earlier with FreeBSD-4.0-(7/8 Snap) and had much better success - with a small redraw problem on the file menu in the Linux JDK/Native no-jit, and a popup data dictionary window not showing right with native and tya-jit. Back to FreeBSD-3.5, I make deinstall XFree86-4.0, then installed XFree86-3.x from the packages and tried again. XFree86-3x was noticeably better at repainting than XFree86-4x but still bad enough to be unusable. Any opinions on other things I could check that may be of use to know? I am using just a generic kernel. I know others have reported success with JBuilder and FreeBSD3.5 I plan to try FreeBSD with my older G200 video card as well as trying it on Linux. David Holland To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Sat Jul 22 2:49:31 2000 Delivered-To: freebsd-java@freebsd.org Received: from mbg.sphere.ne.jp (mbg.sphere.ne.jp [203.138.71.44]) by hub.freebsd.org (Postfix) with ESMTP id C4F0F37B6FC for ; Sat, 22 Jul 2000 02:49:22 -0700 (PDT) (envelope-from daichi@ongs.net) Received: from localhost (pl167.nas511.a-nagoya.nttpc.ne.jp [210.139.68.167]) by mbg.sphere.ne.jp (8.9.3+3.2W/3.7W) with ESMTP id SAA24787 for ; Sat, 22 Jul 2000 18:49:17 +0900 (JST) Date: Sat, 22 Jul 2000 18:50:43 +0900 (JST) From: =?iso-2022-jp?B?GyRCOGVGI0JnQ08bKEI=?= To: FreeBSD Java mailing list Subject: Re: Sun Linux JDK 1.3.0b9 runz on FreeBSD 4.0-STABLE ! In-Reply-to: <20000718010217.A13154@c187104187.telekabel.chello.nl> Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Mailer: =?iso-2022-jp?B?GyRCJGYkOhsoQiAxLjAwMA==?= Organization: =?iso-2022-jp?B?T05HUyAbJEIzK0gvSXQbKEI=?= Mime-Version: 1.0 Message-ID: <84726724.964259443354.JavaMail.daichi@localhost> Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Hi folkz, > > I have the Sun JDK 1.3.0 for Linux, beta 9 running on my FreeBSD > 4.0-STABLE system. Runs pretty nicely too. I tried to use it, too. FreeBSD 4.0-release, linux_base-6.1 And it works fine with classic option. When using HotSpot, some application runs but it will get freeze. JFC/Swing application runs very fast. I was very suprized. It's great. Of cource, SwingSet2 runs very good with classic option. %java -classic -jar SwingSet2.jar But some problems there is. I installed /usr/ports/japanese/linux_locale and setenv LANG ja_JP.EUC. The JFC/Swing application will get freeze too. Perphaps this problem depends on Linux locale problem. umm. In English mode only, the JDK13 works very file with classic option. Daichi T.GOTO(ONGS) http://www.ongs.net/daichi, daichi@ongs.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message