From owner-freebsd-java Mon Apr 30 11:42: 8 2001 Delivered-To: freebsd-java@freebsd.org Received: from ebola.biohz.net (ebola.biohz.net [206.80.1.35]) by hub.freebsd.org (Postfix) with ESMTP id 2465837B423 for ; Mon, 30 Apr 2001 11:42:06 -0700 (PDT) (envelope-from renaud@waldura.org) Received: from renaud (localhost [127.0.0.1]) by ebola.biohz.net (Postfix) with SMTP id 676F0115126; Mon, 30 Apr 2001 11:42:05 -0700 (PDT) Message-ID: <00a101c0d1a5$4581fe10$2301010a@zerog.int> From: "Renaud Waldura" To: , "Bill Huey" Cc: References: Subject: Re: JavaONE anybody ? Date: Mon, 30 Apr 2001 11:42:12 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Yup I'll be there. Although I haven't been very much involved yet, I'd be interested in meeting FreeBSD folks at JavaONE. Let me know if you set something up. --Renaud ----- Original Message ----- From: "Bill Huey" To: Cc: Sent: Friday, April 27, 2001 2:35 PM Subject: JavaONE anybody ? > > Anybody headed to JavaONE here ? Would you folks like to meet assuming > that I get approval for heading out there ? > > bill > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-java" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Mon Apr 30 11:58:57 2001 Delivered-To: freebsd-java@freebsd.org Received: from gatekeeper.orem.verio.net (gatekeeper.orem.verio.net [192.41.0.8]) by hub.freebsd.org (Postfix) with ESMTP id BE43C37B424 for ; Mon, 30 Apr 2001 11:58:53 -0700 (PDT) (envelope-from spencer@veriohosting.com) Received: from proxy.dmz.orem.verio.net (proxy.dmz.orem.verio.net [10.1.1.11]) by gatekeeper.orem.verio.net (Postfix) with ESMTP id 6064D3BF130 for ; Mon, 30 Apr 2001 12:58:53 -0600 (MDT) Received: from veriohosting.com (ufo.office.orem.verio.net [10.2.1.14]) by proxy.dmz.orem.verio.net (Postfix) with ESMTP id 01BD87C004 for ; Mon, 30 Apr 2001 12:58:53 -0600 (MDT) Message-ID: <3AEDB9DC.E627BCD6@veriohosting.com> Date: Mon, 30 Apr 2001 13:15:40 -0600 From: Spencer Proffit X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17 i686) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-java@freebsd.org Subject: Possible bug with static initializers in JDK 1.1.8 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I am using java 1.1.8 on FreeBSD 4.2-RELEASE. If I compile the following code: package scratch.test; public class StaticTest { static { java.util.ResourceBundle.getBundle("scratch.test.StaticTest"); } public static void main(String[] argv) { System.out.println("Hello World!"); } } I get the following error: # javac scratch/test/StaticTest.java # java scratch.test.StaticTest Can't find class scratch.test.StaticTest # It doesn't matter if I compile if with JDK 1.3 on linux or jdk 1.1.8 on FreeBSD. It works fine in linux JDK 1.3 and FreeBSD JDK 1.2.2. It also works if I comment out the bit about the resource bundle. It doesn't make a difference if the properties file exists or not, it always fails on FreeBSD JDK 1.1.8, and on other JDKs it gives the correct error if the file is not found. -- Spencer Proffit spencer@veriohosting.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Mon Apr 30 12:41:51 2001 Delivered-To: freebsd-java@freebsd.org Received: from polarbear.nameprotect.com (mail.nameprotect.com [12.40.85.19]) by hub.freebsd.org (Postfix) with ESMTP id 0193537B423 for ; Mon, 30 Apr 2001 12:41:49 -0700 (PDT) (envelope-from gabor@nameprotect.com) Received: from nameprotect.com (w2kbuild.nameprotect.com [192.168.1.161]) by polarbear.nameprotect.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id JQW0NCWW; Mon, 30 Apr 2001 14:42:04 -0500 Message-ID: <3AEDBFFE.F1ECD545@nameprotect.com> Date: Mon, 30 Apr 2001 14:41:50 -0500 From: Gabor Kincses X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Spencer Proffit Cc: freebsd-java@freebsd.org Subject: Re: Possible bug with static initializers in JDK 1.1.8 References: <3AEDB9DC.E627BCD6@veriohosting.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Spencer Proffit wrote: > > I am using java 1.1.8 on FreeBSD 4.2-RELEASE. If I compile the > following code: > > package scratch.test; > > public class StaticTest { > static { > java.util.ResourceBundle.getBundle("scratch.test.StaticTest"); > } > > public static void main(String[] argv) { > System.out.println("Hello World!"); > } > } > > I get the following error: > > # javac scratch/test/StaticTest.java > # java scratch.test.StaticTest > Can't find class scratch.test.StaticTest > # > > It doesn't matter if I compile if with JDK 1.3 on linux or jdk 1.1.8 on > FreeBSD. > It works fine in linux JDK 1.3 and FreeBSD JDK 1.2.2. It also works if > I comment out the bit about the resource bundle. It doesn't make a > difference if the properties file exists or not, it always fails on > FreeBSD JDK 1.1.8, and on other JDKs it gives the correct error if the > file is not found. Have you tried jikes? We have had problems with static initializers in javac that jikes handled fine. -- Gabor Kincses Running FreeBSD 4.3-RC3 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Tue May 1 7: 8:11 2001 Delivered-To: freebsd-java@freebsd.org Received: from gatekeeper.orem.verio.net (gatekeeper.orem.verio.net [192.41.0.8]) by hub.freebsd.org (Postfix) with ESMTP id 84C2337B423 for ; Tue, 1 May 2001 07:08:08 -0700 (PDT) (envelope-from spencer@veriohosting.com) Received: from proxy.dmz.orem.verio.net (proxy.dmz.orem.verio.net [10.1.1.11]) by gatekeeper.orem.verio.net (Postfix) with ESMTP id 29D943BF10B for ; Tue, 1 May 2001 08:08:08 -0600 (MDT) Received: from veriohosting.com (ufo.office.orem.verio.net [10.2.1.14]) by proxy.dmz.orem.verio.net (Postfix) with ESMTP id 045407C004; Tue, 1 May 2001 08:08:08 -0600 (MDT) Message-ID: <3AEEC73C.7E7C2AAE@veriohosting.com> Date: Tue, 01 May 2001 08:25:00 -0600 From: Spencer Proffit X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17 i686) X-Accept-Language: en MIME-Version: 1.0 To: Gabor Kincses Cc: freebsd-java@freebsd.org Subject: Re: Possible bug with static initializers in JDK 1.1.8 References: <3AEDB9DC.E627BCD6@veriohosting.com> <3AEDBFFE.F1ECD545@nameprotect.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I tried compiling with jikes with the same result. Gabor Kincses wrote: > > Spencer Proffit wrote: > > > > I am using java 1.1.8 on FreeBSD 4.2-RELEASE. If I compile the > > following code: > > > > package scratch.test; > > > > public class StaticTest { > > static { > > java.util.ResourceBundle.getBundle("scratch.test.StaticTest"); > > } > > > > public static void main(String[] argv) { > > System.out.println("Hello World!"); > > } > > } > > > > I get the following error: > > > > # javac scratch/test/StaticTest.java > > # java scratch.test.StaticTest > > Can't find class scratch.test.StaticTest > > # > > > > It doesn't matter if I compile if with JDK 1.3 on linux or jdk 1.1.8 on > > FreeBSD. > > It works fine in linux JDK 1.3 and FreeBSD JDK 1.2.2. It also works if > > I comment out the bit about the resource bundle. It doesn't make a > > difference if the properties file exists or not, it always fails on > > FreeBSD JDK 1.1.8, and on other JDKs it gives the correct error if the > > file is not found. > > Have you tried jikes? We have had problems with static initializers in > javac that jikes handled fine. > > -- > Gabor Kincses > Running FreeBSD 4.3-RC3 -- Spencer Proffit spencer@veriohosting.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Tue May 1 7:52:47 2001 Delivered-To: freebsd-java@freebsd.org Received: from polarbear.nameprotect.com (mail.nameprotect.com [12.40.85.19]) by hub.freebsd.org (Postfix) with ESMTP id 90BE237B422 for ; Tue, 1 May 2001 07:52:44 -0700 (PDT) (envelope-from gabor@nameprotect.com) Received: from nameprotect.com (w2kbuild.nameprotect.com [192.168.1.161]) by polarbear.nameprotect.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id J0DDD2Z8; Tue, 1 May 2001 09:52:57 -0500 Message-ID: <3AEECDBF.EB2AA0AF@nameprotect.com> Date: Tue, 01 May 2001 09:52:47 -0500 From: Gabor Kincses X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Spencer Proffit Cc: freebsd-java@freebsd.org Subject: Re: Possible bug with static initializers in JDK 1.1.8 References: <3AEDB9DC.E627BCD6@veriohosting.com> <3AEDBFFE.F1ECD545@nameprotect.com> <3AEEC73C.7E7C2AAE@veriohosting.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Spencer Proffit wrote: > > I tried compiling with jikes with the same result. I have tried it on JDK 1.1.7 on Solaris and got the same results. JDK 1.3.0-RC works fine. Compiled with jikes in both cases. You may want to try the IBM Linux JDK 1.1.8 if you really need to stick to 1.1. Otherwise 1.2-1.3 might be better, the JITs are much better anyway. > > Gabor Kincses wrote: > > > > Spencer Proffit wrote: > > > > > > I am using java 1.1.8 on FreeBSD 4.2-RELEASE. If I compile the > > > following code: > > > > > > package scratch.test; > > > > > > public class StaticTest { > > > static { > > > java.util.ResourceBundle.getBundle("scratch.test.StaticTest"); > > > } > > > > > > public static void main(String[] argv) { > > > System.out.println("Hello World!"); > > > } > > > } > > > > > > I get the following error: > > > > > > # javac scratch/test/StaticTest.java > > > # java scratch.test.StaticTest > > > Can't find class scratch.test.StaticTest > > > # > > > > > > It doesn't matter if I compile if with JDK 1.3 on linux or jdk 1.1.8 on > > > FreeBSD. > > > It works fine in linux JDK 1.3 and FreeBSD JDK 1.2.2. It also works if > > > I comment out the bit about the resource bundle. It doesn't make a > > > difference if the properties file exists or not, it always fails on > > > FreeBSD JDK 1.1.8, and on other JDKs it gives the correct error if the > > > file is not found. > > > > Have you tried jikes? We have had problems with static initializers in > > javac that jikes handled fine. -- Gabor Kincses Running FreeBSD 4.3-RC3 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Wed May 2 9: 3:36 2001 Delivered-To: freebsd-java@freebsd.org Received: from math.teaser.net (math.teaser.net [213.91.2.4]) by hub.freebsd.org (Postfix) with ESMTP id 8146A37B424 for ; Wed, 2 May 2001 09:03:33 -0700 (PDT) (envelope-from jaco@teaser.fr) Received: from titine.fr.eu.org (d45-1.ppp.teaser.fr [213.91.45.1]) by math.teaser.net (Postfix) with ESMTP id 615F16C801; Wed, 2 May 2001 18:03:31 +0200 (CEST) Received: by titine.fr.eu.org (Postfix, from userid 1001) id 48B0833AE; Wed, 2 May 2001 16:49:29 +0200 (CEST) X-Attribution: Jaco To: past@netmode.ntua.gr Cc: freebsd-java@FreeBSD.ORG Subject: Re: java 1.3? References: <20010501195620.M5017@casimir.physics.purdue.edu> <86elu8j72o.fsf@titine.fr.eu.org> <20010502170927.B18688@netmode.ece.ntua.gr> From: Eric Jacoboni Date: 02 May 2001 16:49:29 +0200 In-Reply-To: <20010502170927.B18688@netmode.ece.ntua.gr> (Panagiotis Astithas's message of "Wed, 2 May 2001 17:09:27 +0300") Message-ID: <86sniniz5y.fsf@titine.fr.eu.org> Lines: 59 User-Agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.0.102 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >>>>> "Panagiotis" == Panagiotis Astithas writes: >> >> This port doesn't work well enough to use it in production... Have you >> tried it with some big code (Forte, for example) ? See the crashes (or >> freezes, it depends)? Panagiotis> You mean you have encountered crashes or freezes using the Panagiotis> classic VM? Yes, i mean exactly that... Try to use Forte, create a new project and try to add a main class, you will see what i mean. $ runide -jdkhome /usr/local/linux-jdk1.3.0 -classic (...) Boom! $ cat ~/forte4j_user/system/ide.log Product Version = Forte(tm) for Java(tm), release 2.0,\ (...) Community Edition (Build 1160) IDE Versioning = IDE/1 spec=1.1.0.1 impl=Build 1160 Operating System = Linux Version 2.2.12 Running on i386 Java Version = 1.3.0_02 Java VM Version = Classic VM 1.3.0_02 Java Vendor = Sun Microsystems Inc. Java Vendor URL = http://java.sun.com/ Java Home = /usr/local/linux-jdk1.3.0/jre Java Class Version = 47.0 System Locale = fr_FR JIT = NONE Home Dir = /home/jaco Current Directory = /usr/home/jaco/Travail/ProgrammingRuby-0.2/html Forte for Java Home = /usr/local/forte4j Forte for Java User Home = /home/jaco/forte4j_user System Directory = /home/jaco/forte4j_user/system ********** Exception occurred ************ Wed May 02 16:09:19 CEST 2001java.lang.IllegalStateException: \ Expected target folder & template, got null(s) java.lang.IllegalStateException: Expected target folder & template, got null(s) at org.netbeans.modules.java.wizard.InheritancePanel.readSettings(InheritancePanel.java:396) (...) Same problem with some others big classes, as xt or xalan (which run ok with jdk1.1.8). Panagiotis> If so, everyone on the freebsd-java mailing Panagiotis> list would be interested to know more. I'm on this list (where this thread should go on) and it seems i'm not the only one to speak about that. Panagiotis> The hotspot VM of Panagiotis> course is a different issue. -hostpot or -classic, that the same for me :( I can only use this port to write some tutorial classes but not for production applications. -- Éric Jacoboni, né il y a 1292177164 secondes. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Thu May 3 12:29:23 2001 Delivered-To: freebsd-java@freebsd.org Received: from scoop.demon.nl (scoop.demon.nl [212.238.112.35]) by hub.freebsd.org (Postfix) with ESMTP id 0D8E737B424 for ; Thu, 3 May 2001 12:29:19 -0700 (PDT) (envelope-from FreeBSD-Java@scoop.demon.nl) Received: from pentium.localnet.org (pentium.localnet.org [10.1.1.3]) by scoop.demon.nl (8.8.8/8.8.8) with SMTP id VAA01425; Thu, 3 May 2001 21:28:58 +0200 Message-Id: <200105031928.VAA01425@scoop.demon.nl> X-Sender: michel@pop3.scoop.demon.nl (Unverified) X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0 Date: Thu, 03 May 2001 21:31:01 +0200 To: Pascal Echevest From: Michel Otte Subject: Re: Tomcat's mod_jk initialization error Cc: FreeBSD-Java@freebsd.org In-Reply-To: <3AF15C4C.7E5A5701@experian-scorex.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello, Yes I've found the solution to this problem after a lot of searching in the tomcat-users mailing list archives. The problem is as follows: The Makefile for FreeBSD (Makefile.freebsd) does simply not compile all the objects which are needed for the shared object to link correctly. In detail, the Makefile only compiles the object mod_jk.o and only links that object into the mod_jk.so Apache shared object. You can reconstruct the Makefile to compile and link the other objects from the ../jk directory, or just compile the shared object by hand with the "apxs" tool. How you should do this, is explained in the - not very detailed - "mod_jk HOWTO" from the tomcat distribution. You should execute the following from the directory tomcat-3.2.1-src/src/native/apache1.3 : $APACHE_HOME/bin/apxs -c -I$JAVA_HOME/include -I$JAVA_HOME/include/freebsd -DFREEBSD -I$APACHE_HOME/include -I../jk mod_jk.c ../jk/*.c "$APACHE_HOME" should be the path to where you have your Apache is installed, for example /usr/local/apache. You should set $JAVA_HOME or replace it with the path to where your JDK version is installed, probably /usr/local/jdk1.2. I executed it as follows: /usr/local/apache/bin/apxs -c -I/usr/local/jdk1.2/include -I/usr/local/jdk1.2/include/freebsd -DFREEBSD -I/usr/local/apache/include -I../jk mod_jk.c ../jk/*.c The Makefile only executed: /usr/local/apache/bin/apxs -c -I/usr/local/jdk1.2/include -I/usr/local/jdk1.2/include/freebsd -DFREEBSD -I/usr/local/apache/include -I../jk mod_jk.c which produces a 18073 bytes mod_jk.so which is NOT usable. I MUST say I had tried this before and it failed, just because I didn't compile Apache with the options --enable-rule=SHARED_CORE. Stupid enough I hadn't tried this _after_ compiling Apache with a SHARED_CORE enabled. So please be sure to compile Apache with --enable-module=so and --enable-rule=SHARED_CORE, otherwise the compile with apxs will definitely fail. I hope this helps you and others. Kind regards, Michel Otte. At 15:25 3-5-01 +0200, you wrote: >Hi, > >I've just seen your message below and I would like >to ask you if you finally found a solution to this >problem. I've exactly the same problem and I cannot >solve it. > >Thanks and regards, >Pascal To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Fri May 4 4:10:28 2001 Delivered-To: freebsd-java@freebsd.org Received: from icope.com (PPP-89-112.bng.vsnl.net.in [202.54.89.112]) by hub.freebsd.org (Postfix) with SMTP id 1165537B423 for ; Fri, 4 May 2001 04:10:25 -0700 (PDT) (envelope-from ksudhir@icope.com) Received: from nd101 by icope.com with SMTP (MDaemon.v2.7.SP5.R) for ; Fri, 04 May 2001 16:42:39 +0530 From: "Sudhir Kumar" To: "'java-port@FreeBSD.ORG'" Subject: Reading and writing audio data at the same time on Linux Date: Fri, 4 May 2001 16:57:27 +0530 Message-ID: <51C3A5885AC5D111B68100201861C72750218D@INTERCOPE> 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 CWS, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-MDaemon-Deliver-To: freebsd-java@FreeBSD.ORG X-Return-Path: ksudhir@icope.com Reply-To: KSudhir@icope.com Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I am doing an application (voice based) that require "Source data line"(audio data can be read) and "Target data line"(data may be written) to be open at the same time. I am creating two threads, one for reading, and other for writing and starts both at same time. On Windows 2000, both thread runs, but on Linux one thread blocks. If thread started reading the audio data from "Source data line" then other will wait for some resource and vice versa. If i run one thread in my application (any one thread), it works. If i run each thread in different application, it blocks. Everything runs perfectly well on Windows 2000. I am using jdk1.3 on SuSe Linux 7.0 and using javax.sound.sampled package. Can anyone give me an idea of what to do? I would be glad to explain more. Thanks in advance for your help. Sudhir To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Fri May 4 5:16:50 2001 Delivered-To: freebsd-java@freebsd.org Received: from s1.servlets.net (s1.servlets.net [209.221.135.4]) by hub.freebsd.org (Postfix) with ESMTP id 445E037B443 for ; Fri, 4 May 2001 05:16:47 -0700 (PDT) (envelope-from inonit@inonit.com) Received: from inonit (oh-clevelandheights4a-84.clvhoh.adelphia.net [24.50.237.84]) by s1.servlets.net (8.9.3/8.9.3) with SMTP id FAA02124 for ; Fri, 4 May 2001 05:16:41 -0700 From: "David P. Caldwell" To: Subject: RE: Reading and writing audio data at the same time on Linux Date: Fri, 4 May 2001 08:16:37 -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) In-Reply-To: <51C3A5885AC5D111B68100201861C72750218D@INTERCOPE> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I'm not an expert on the linux JDK, but I ran into this sort of problem a few years back. Could it have to do with different scheduling? Since the Java VM specification doesn't say much about how threads have to work, implementors on Windows have tended to use timeslicing (which Windows has), while implementors on Unix-like OSes have tended to use preemptive (for different priorities) but non-timeslicing scheduling. On Unix-like OSes, usually a call to Thread.yield() is required periodically if you want other threads with equal priority to have a chance to run. Alternately, you can start a separate Thread at Thread.MAX_PRIORITY that just wakes up every specified number of milliseconds and does nothing, causing the scheduler to switch threads. Or I might be on the wrong track entirely, of course. Apologies in advance. -- David. -----Original Message----- From: owner-freebsd-java@FreeBSD.ORG [mailto:owner-freebsd-java@FreeBSD.ORG]On Behalf Of Sudhir Kumar Sent: Friday, May 04, 2001 7:27 AM To: 'java-port@FreeBSD.ORG' Subject: Reading and writing audio data at the same time on Linux Hi, I am doing an application (voice based) that require "Source data line"(audio data can be read) and "Target data line"(data may be written) to be open at the same time. I am creating two threads, one for reading, and other for writing and starts both at same time. On Windows 2000, both thread runs, but on Linux one thread blocks. If thread started reading the audio data from "Source data line" then other will wait for some resource and vice versa. If i run one thread in my application (any one thread), it works. If i run each thread in different application, it blocks. Everything runs perfectly well on Windows 2000. I am using jdk1.3 on SuSe Linux 7.0 and using javax.sound.sampled package. Can anyone give me an idea of what to do? I would be glad to explain more. Thanks in advance for your help. Sudhir To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Fri May 4 8:26:49 2001 Delivered-To: freebsd-java@freebsd.org Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by hub.freebsd.org (Postfix) with ESMTP id B978937B440 for ; Fri, 4 May 2001 08:26:46 -0700 (PDT) (envelope-from Jan.Grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Fri, 4 May 2001 16:25:29 +0100 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 3.16 #1) id 14vhRe-0000lE-00; Fri, 04 May 2001 16:24:38 +0100 Date: Fri, 4 May 2001 16:24:38 +0100 (BST) From: Jan Grant To: "David P. Caldwell" Cc: freebsd-java Subject: RE: Reading and writing audio data at the same time on Linux In-Reply-To: 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 Fri, 4 May 2001, David P. Caldwell wrote: > I'm not an expert on the linux JDK, but I ran into this sort of problem a > few years back. > > Could it have to do with different scheduling? > > Since the Java VM specification doesn't say much about how threads have to > work, implementors on Windows have tended to use timeslicing (which Windows > has), while implementors on Unix-like OSes have tended to use preemptive > (for different priorities) but non-timeslicing scheduling. > > On Unix-like OSes, usually a call to Thread.yield() is required periodically > if you want other threads with equal priority to have a chance to run. > Alternately, you can start a separate Thread at Thread.MAX_PRIORITY that > just wakes up every specified number of milliseconds and does nothing, > causing the scheduler to switch threads. Actually, according to the java spec (as I've been led to understand it) there is NO WAY to guarantee round-robin timesliced scheduling in java. Why? Well, your suggestion above sounds plausible: have a high-priority thread wake up occasionally and ensure that the right priority thread is running. But Java says that thread priorities may be mapped onto a smaller number of priority levels that the ohst OS provides, and says nothing about how that mapping is performed. The result is that there seems (to me, at least) to be NO portable way of ensuring that your MAX_PRIORITY thread is _really_ running at any higher priorituy than any other thread, so it may never wake up. If this is wrong, I'd love to hear of a pointer to the bits in the spec that I've misunderstood ...? -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287163 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk stty intr ^m To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Fri May 4 10:35:50 2001 Delivered-To: freebsd-java@freebsd.org Received: from web11504.mail.yahoo.com (web11504.mail.yahoo.com [216.136.172.36]) by hub.freebsd.org (Postfix) with SMTP id C195037B422 for ; Fri, 4 May 2001 10:35:47 -0700 (PDT) (envelope-from inonit@yahoo.com) Message-ID: <20010504173547.56360.qmail@web11504.mail.yahoo.com> Received: from [168.98.152.156] by web11504.mail.yahoo.com; Fri, 04 May 2001 10:35:47 PDT Date: Fri, 4 May 2001 10:35:47 -0700 (PDT) From: David Caldwell Reply-To: inonit@inonit.com Subject: RE: Reading and writing audio data at the same time on Linux To: freebsd-java@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Jan: I agree with what you've said ... there is no "guaranteed portable" way of ensuring timesliced scheduling. The MAX_PRIORITY thread is a 90% solution that works (essentially emulates timeslicing) in all the VMs that I know of ... but perfectly legal Java VMs could be constructed in which it would not work (as you point out, it would be legal to map every priority onto one native priority, for instance). I think the only way to guarantee that a thread will run is to make sure that every other thread is blocked. That said, I don't have an encyclopedic knowledge of the spec, either, and I'm too lazy to check it right now. If I do give the spec a good read before anyone else does, I'll post the results. -- David. --- Jan Grant wrote: > On Fri, 4 May 2001, David P. Caldwell wrote: > > > I'm not an expert on the linux JDK, but I ran into this sort of problem a > > few years back. > > > > Could it have to do with different scheduling? > > > > Since the Java VM specification doesn't say much about how threads have to > > work, implementors on Windows have tended to use timeslicing (which Windows > > has), while implementors on Unix-like OSes have tended to use preemptive > > (for different priorities) but non-timeslicing scheduling. > > > > On Unix-like OSes, usually a call to Thread.yield() is required > periodically > > if you want other threads with equal priority to have a chance to run. > > Alternately, you can start a separate Thread at Thread.MAX_PRIORITY that > > just wakes up every specified number of milliseconds and does nothing, > > causing the scheduler to switch threads. > > Actually, according to the java spec (as I've been led to understand it) > there is NO WAY to guarantee round-robin timesliced scheduling in java. > > Why? Well, your suggestion above sounds plausible: have a high-priority > thread wake up occasionally and ensure that the right priority thread is > running. But Java says that thread priorities may be mapped onto a > smaller number of priority levels that the ohst OS provides, and says > nothing about how that mapping is performed. The result is that there > seems (to me, at least) to be NO portable way of ensuring that your > MAX_PRIORITY thread is _really_ running at any higher priorituy than any > other thread, so it may never wake up. > > If this is wrong, I'd love to hear of a pointer to the bits in the spec > that I've misunderstood ...? > > -- > jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ > Tel +44(0)117 9287163 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk > stty intr ^m > > __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message From owner-freebsd-java Fri May 4 16:19:53 2001 Delivered-To: freebsd-java@freebsd.org Received: from megapathdsl.net (snowbird.megapath.net [216.200.176.7]) by hub.freebsd.org (Postfix) with ESMTP id B557037B424 for ; Fri, 4 May 2001 16:19:40 -0700 (PDT) (envelope-from greg@sextant.com) Received: from [216.36.77.184] (HELO blue) by megapathdsl.net (CommuniGate Pro SMTP 3.4.3) with SMTP id 21465837 for freebsd-java@freebsd.org; Fri, 04 May 2001 16:18:42 -0700 Message-ID: <000c01c0d4f0$2c7e7b20$0c01a8c0@blue> Reply-To: "Greg Walton" From: "Greg Walton" To: Subject: Problems building JDK1.2.2 on FreeBSD 4.0 Date: Fri, 4 May 2001 16:15:56 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0009_01C0D4B5.7FE29A20" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C0D4B5.7FE29A20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable While building I get the followng error: =3D=3D=3D> Building for=20 Sanity check passed >>>Recursively making java all... gmake[1]: Entering directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java' >>>Recursively making hpi all @ Fri May 4 15:57:21 PDT 2001 ... gmake[2]: Entering directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi' >>>Recursively making green all @ Fri May 4 15:57:21 PDT 2001 ... gmake[3]: Entering directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi/green' gmake ../../../lib/i386/green_threads/libhpi.so VARIANT=3DOPT gmake[4]: Entering directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi/green' gmake[4]: Leaving directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi/green' gmake ../../../lib/i386/green_threads/libhpi_g.so VARIANT=3DDBG gmake[4]: Entering directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi/green' gmake[4]: Leaving directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi/green' gmake[3]: Leaving directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi/green' <<>>Recursively making jvm all @ Fri May 4 15:57:22 PDT 2001 ... gmake[2]: Entering directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java/jvm' gmake ../../lib/i386/classic/libjvm.so VARIANT=3DOPT gmake[3]: Entering directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java/jvm' rm -f .classes.list if [ -s .classes.list ] ; \ then /usr/local/java/jdk1.2/x86/bin/javac -J-Xms32m -J-Xmx64m -J-Xmaxf1 = -classpath ../../classes -bootclasspath "" -sourcepath = ../../../../src/freebsd/classes:../../../../src/share/classes -d = ../../classes \ ../../../../src/share/classes/java/io/InputStream.java = ../../../../src/share/classes/java/lang/Boolean.java = ../../../../src/share/classes/java/lang/Byte.java = ../../../../src/share/classes/java/lang/Character.java = ../../../../src/share/classes/java/lang/Class.java = ../../../../src/share/classes/java/lang/ClassLoader.java = ../../../../src/share/classes/java/lang/Double.java = ../../../../src/share/classes/java/lang/Float.java = ../../../../src/share/classes/java/lang/Integer.java = ../../../../src/share/classes/java/lang/Long.java = ../../../../src/share/classes/java/lang/Object.java = ../../../../src/share/classes/java/lang/Runtime.java = ../../../../src/share/classes/java/lang/Short.java = ../../../../src/share/classes/java/lang/StackOverflowError.java = ../../../../src/share/classes/java/lang/String.java = ../../../../src/share/classes/java/lang/Thread.java = ../../../../src/share/classes/java/lang/ThreadGroup.java = ../../../../src/share/classes/java/lang/Throwable.java = ../../../../src/share/classes/java/lang/ref/Reference.java = ../../../../src/share/classes/java/lang/ref/SoftReference.java = ../../../../src/share/classes/java/lang/reflect/Field.java = ../../../../src/share/classes/java/lang/reflect/Method.java = ../../../../src/share/classes/java/lang/reflect/Constructor.java = ../../../../src/share/classes/java/lang/reflect/InvocationTargetException= .java = ../../../../src/share/classes/java/security/AccessControlContext.java = ../../../../src/share/classes/java/util/Properties.java = ../../../../src/share/classes/sun/io/ByteToCharConverter.java = ../../../../src/share/classes/sun/io/CharToByteConverter.java = ../../../../src/share/classes/sun/misc/VM.java ; \ fi gmake[3]: Leaving directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java/jvm' gmake[2]: Leaving directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java/jvm' gmake[1]: Leaving directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java' *** Error code 2 Stop in /usr/ports/java/jdk12-beta. *** Error code 1 Stop in /usr/ports/java/jdk12-beta. *** Error code 1 Stop in /usr/ports/java/jdk12-beta. *** Error code 1 Stop in /usr/ports/java/jdk12-beta. ****************************************************** Can somebody point me in the right direction. Thanks a lot. Greg ------=_NextPart_000_0009_01C0D4B5.7FE29A20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
While building I get the followng=20 error:
 
 
=3D=3D=3D>  Building for =
Sanity check=20 passed
 
>>>Recursively making java=20 all...
gmake[1]: Entering directory=20 `/usr/ports/java/jdk12-beta/work/build/freebsd/java'
>>>Recur= sively=20 making hpi all @ Fri May  4 15:57:21 PDT 2001 ...
gmake[2]: = Entering=20 directory=20 `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi'
>>>R= ecursively=20 making green all @ Fri May  4 15:57:21 PDT 2001 ...
gmake[3]: = Entering=20 directory=20 `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi/green'
gmake=20 ../../../lib/i386/green_threads/libhpi.so VARIANT=3DOPT
gmake[4]: = Entering=20 directory=20 `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi/green'
gmake[4= ]:=20 Leaving directory=20 `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi/green'
gmake=20 ../../../lib/i386/green_threads/libhpi_g.so VARIANT=3DDBG
gmake[4]: = Entering=20 directory=20 `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi/green'
gmake[4= ]:=20 Leaving directory=20 `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi/green'
gmake[3= ]:=20 Leaving directory=20 `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi/green'
<<= ;<Finished=20 Recursively making green all @ Fri May  4 15:57:22 PDT = 2001.
gmake[2]:=20 Leaving directory=20 `/usr/ports/java/jdk12-beta/work/build/freebsd/java/hpi'
<<<F= inished=20 Recursively making hpi all @ Fri May  4 15:57:22 PDT=20 2001.
>>>Recursively making jvm all @ Fri May  4 = 15:57:22 PDT=20 2001 ...
gmake[2]: Entering directory=20 `/usr/ports/java/jdk12-beta/work/build/freebsd/java/jvm'
gmake=20 ../../lib/i386/classic/libjvm.so VARIANT=3DOPT
gmake[3]: Entering = directory=20 `/usr/ports/java/jdk12-beta/work/build/freebsd/java/jvm'
rm -f=20 .classes.list
if [ -s .classes.list ] ; \
then=20 /usr/local/java/jdk1.2/x86/bin/javac -J-Xms32m -J-Xmx64m -J-Xmaxf1 = -classpath=20 ../../classes -bootclasspath "" -sourcepath=20 ../../../../src/freebsd/classes:../../../../src/share/classes -d=20 ../../classes  \
   =20 ../../../../src/share/classes/java/io/InputStream.java=20 ../../../../src/share/classes/java/lang/Boolean.java=20 ../../../../src/share/classes/java/lang/Byte.java=20 ../../../../src/share/classes/java/lang/Character.java=20 ../../../../src/share/classes/java/lang/Class.java=20 ../../../../src/share/classes/java/lang/ClassLoader.java=20 ../../../../src/share/classes/java/lang/Double.java=20 ../../../../src/share/classes/java/lang/Float.java=20 ../../../../src/share/classes/java/lang/Integer.java=20 ../../../../src/share/classes/java/lang/Long.java=20 ../../../../src/share/classes/java/lang/Object.java=20 ../../../../src/share/classes/java/lang/Runtime.java=20 ../../../../src/share/classes/java/lang/Short.java=20 ../../../../src/share/classes/java/lang/StackOverflowError.java=20 ../../../../src/share/classes/java/lang/String.java=20 ../../../../src/share/classes/java/lang/Thread.java=20 ../../../../src/share/classes/java/lang/ThreadGroup.java=20 ../../../../src/share/classes/java/lang/Throwable.java=20 ../../../../src/share/classes/java/lang/ref/Reference.java=20 ../../../../src/share/classes/java/lang/ref/SoftReference.java=20 ../../../../src/share/classes/java/lang/reflect/Field.java=20 ../../../../src/share/classes/java/lang/reflect/Method.java=20 ../../../../src/share/classes/java/lang/reflect/Constructor.java=20 ../../../../src/share/classes/java/lang/reflect/InvocationTargetException= .java=20 ../../../../src/share/classes/java/security/AccessControlContext.java=20 ../../../../src/share/classes/java/util/Properties.java=20 ../../../../src/share/classes/sun/io/ByteToCharConverter.java=20 ../../../../src/share/classes/sun/io/CharToByteConverter.java=20 ../../../../src/share/classes/sun/misc/VM.java ; \
fi
gmake[3]: = Leaving=20 directory = `/usr/ports/java/jdk12-beta/work/build/freebsd/java/jvm'
gmake[2]:=20 Leaving directory=20 `/usr/ports/java/jdk12-beta/work/build/freebsd/java/jvm'
gmake[1]: = Leaving=20 directory `/usr/ports/java/jdk12-beta/work/build/freebsd/java'
*** = Error code=20 2
 
Stop in = /usr/ports/java/jdk12-beta.
*** Error=20 code 1
 
Stop in = /usr/ports/java/jdk12-beta.
*** Error=20 code 1
 
Stop in = /usr/ports/java/jdk12-beta.
*** Error=20 code 1
 
Stop in=20 /usr/ports/java/jdk12-beta.
******************************************************
 
Can somebody point me in the right=20 direction.
Thanks a lot.
 
 
Greg
------=_NextPart_000_0009_01C0D4B5.7FE29A20-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message