<from .java_wrapper >

# Interpret THREADS_FLAG environment variable, if set.
DEFAULT_THREADS_FLAG=native
if [ "${THREADS_FLAG}" = green -o "${THREADS_FLAG}" = native ]; then
    THREADS_TYPE="${THREADS_FLAG}_threads"
elif [ "x${THREADS_FLAG}" = x ]; then
    THREADS_TYPE="${DEFAULT_THREADS_FLAG}_threads"
else
    echo >&2 "Error: value \`${THREADS_FLAG}' of variable THREADS_FLAG is
illegal."
    exit 1
fi


# Select HPI, and take note of VM type.  Note that the assignment below does
# not mean that the assigned values are the defaults for `ttype' and
`vmtype'.
ttype=native_threads
vmtype=classic
if [ "x$1" = "x-hotspot" ]; then
    # Backward compatibility: The 1.3 betas used -hotspot
    # User wants HotSpot Client.  Replace -hotspot with -client.
    shift 1
    set -- -client "$@"
fi
if [ "x$1" = "x-classic" ]; then
    # User wants classic
    ttype="${THREADS_TYPE}"
elif [ "x$1" = "x-green" ]; then
    # User wants classic/green.  Replace -green with -classic.
    ttype=green_threads
    shift 1
    set -- -classic "$@"
elif [ "x$1" = "x-native" ]; then
    # User wants classic/native.  Replace -native with -classic.
    ttype=native_threads
    shift 1
    set -- -classic "$@"
elif grep "^$1\$" ${jre}/lib/jvm.cfg > /dev/null; then
    # User specified some VM type known to jvm.cfg.
    vmtype=`echo $1 | cut -c 2-`
else
    # User didn't specify a VM type, see if default is classic.
    default=`grep -v '^#' "${jre}/lib/jvm.cfg" | head -1`
    if [ "x$default" = "x-classic" ]; then
        ttype="${THREADS_TYPE}"
    fi
    vmtype=`echo ${default} | cut -c 2-`
fi

if [ "${vmtype}" = "classic" ]; then
    if [ "${ttype}" = "green_threads" ]; then
        LD_BIND_NOW=yes
        export LD_BIND_NOW
    fi
    _JVM_THREADS_TYPE=${ttype}
    export _JVM_THREADS_TYPE
fi

<end from java_wrapper>

the jvm.cfg file
lists 
-client
-server
-classic

 ... does that mean this one doesnt understand green ?

what version of the jre should i get to get green threads to work ok ?

bruno


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 7 juni 2002 10:58
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: how to enable green threads


> when i run the java command with option '-green' it gives this error:
>
> Green threads support not available
> Could not create the Java virtual machine.

HotSpot Server and Client VM need native threads.  They cannot work
with green threads.  So, you have to choose Classic VM if you want to
use green threads.

You can change the kind of JVM by modifying <JDK_HOME>/jre/lib/jvm.cfg
or supplying -classic option to the java command.

Recent JDK may not accept -green option even if you choose the Classic
VM.  In that case, <JDK_HOME>/bin/.java_wrapper and
<JDK_HOME>/jre/bin/.java_wrapper are worth investigating.
Those shell scripts are invoked when you run the java command.
At least, you can choose the thread library by modifying those scripts
because the scripts determine whether threading library is used.

> so it seems that there is no support for green threads anymore in
> 'j2re-1.3.1-02b-FCS-linux-i386.bin'

Note that JDK (JRE) 1.4 does not contain the Classic VM.
Thus we cannot use green threads with 1.4.

  Kazuyuki Shudo        [EMAIL PROTECTED]      http://www.shudo.net/


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
 
> *************************************************************
> Dit e-mail bericht inclusief eventuele ingesloten bestanden kan informatie
> bevatten die vertrouwelijk is en/of beschermd door intellectuele
> eigendomsrechten. Dit bericht is uitsluitend bestemd voor de
> geadresseerde(n). Elk gebruik van de informatie vervat in dit bericht
> (waaronder de volledige of gedeeltelijke reproductie of verspreiding onder
> elke vorm) door andere personen dan de geadresseerde(n) is verboden.
> Indien u dit bericht per vergissing heeft ontvangen, gelieve de afzender
> hiervan te verwittigen en dit bericht te verwijderen. 
> 
> This e-mail and any attachment thereto may contain information which is
> confidential and/or protected by intellectual property rights and are
> intended for the sole use of the addressees. Any use of the information
> contained herein (including but not limited to total or partial
> reproduction or distribution in any form) by other persons than the
> addressees is prohibited. If you have received this e-mail in error,
> please notify the sender and delete its contents. 
> *************************************************************
> 


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to