From owner-freebsd-java Tue Feb 12 8: 9:43 2002 Delivered-To: freebsd-java@freebsd.org Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by hub.freebsd.org (Postfix) with ESMTP id 669C437B402 for ; Tue, 12 Feb 2002 08:09:40 -0800 (PST) Received: from rpsmtp1.aist.go.jp by mx1.aist.go.jp with ESMTP id g1CFnVH12818; Wed, 13 Feb 2002 00:49:31 +0900 (JST) env-from (shudo@computer.org) Received: from mail11.aist.go.jp by rpsmtp1.aist.go.jp with ESMTP id g1CFnVn02030; Wed, 13 Feb 2002 00:49:31 +0900 (JST) env-from (shudo@computer.org) Received: from aist.go.jp by mail11.aist.go.jp with ESMTP id g1CFnTx25592; Wed, 13 Feb 2002 00:49:30 +0900 (JST) env-from (shudo@computer.org) Date: Wed, 13 Feb 2002 00:49:35 +0900 (JST) Message-Id: <20020213.004935.730551162.shudoh@localhost> To: meshko@cs.brandeis.edu Cc: freebsd-java@FreeBSD.ORG Subject: Re: Java for FreeBSD From: shudo@computer.org In-Reply-To: References: <20020212.172258.884010917.shudoh@localhost> X-Mailer: Mew version 2.1 on XEmacs 21.4.6 (Common Lisp) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi Mikhail, > > > Mozilla requires java plugin which doesn't yet work in native jdk > > > (requires native threading, people are working on that) > > > > That's a false story. > > Java Plug-in does not require native threads, > > and work with Green Threads. > > > > I could confirm it on Linux and Fuyuhiko Maruyama achieved it on FreeBSD. > > Have there been any information about that on this mailing list?? AFAIK, Not yet. > I remember a lot of discussion of how it's absolutely impossible to get > plugin working with green threads. I could also remember. Once I almost believed it. But my version of Java Plug-in can invoke a Java VM which uses Green Threads on Linux. Fuyuhiko said he could achieve it on FreeBSD independently. Java Plug-in consists of two parts, a shared library (javaplugin_oji.so or javaplugin.so) and an executable (java_vm). First a web browser loads the library. Next the library do fork(2) and exec(2) the executable to create a process which becomes a Java VM. The created process and the web browser are different processes, so the created process can use a different thread library from the web browser. The invoked Java VM can use Green Threads, even though the parent web browser needs native threads. I thought of using JIT compilers for Classic VM like shuJIT and OpenJIT with Java Plug-in. But the original source code of JDK 1.3.1 Java Plug-in is written as invoking HotSpot Client VM. I tried to change the source code so as to invoke Classic VM. Then I found the structure of Java Plug-in in which there are two parts. I tried Green Threads and succeeded. Kazuyuki Shudo shudo@computer.org http://www.shudo.net/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message