dear friends,
i am going to write an multithreaded application using java
SUN provided the type of thread called green threads,but i am not going
to use GREEN THREADS due to the disadvantage of not supporting to
PORTABILITY issue ,so i am going to use
NATIVE THREADS ,friends please tell me how can i write the code using NATIVE THREADS
and tell me how to invoke NATIVE THREADS.
and also i want to know ,how can i verify wheather my application using NATIVE THREADS or GREEN THREADS
thank's in advance
rex
-
GREEN THREADS ,NATIVE THREADS (2 messages)
- Posted by: rex rex
- Posted on: January 28 2001 00:12 EST
Threaded Messages (2)
- GREEN THREADS ,NATIVE THREADS by Raj Rajen on January 29 2001 16:37 EST
- GREEN THREADS ,NATIVE THREADS by rex rex on January 30 2001 02:28 EST
-
GREEN THREADS ,NATIVE THREADS[ Go to top ]
- Posted by: Raj Rajen
- Posted on: January 29 2001 16:37 EST
- in response to rex rex
From what I know, the code that you write does not change whether you use Green threads or Native Threads. Back in the old days of JDK 1.1.8 (and below?) there used to be something called the Java Native Threads Pack. You installed it, and made sure that the environment variable called THREADS_FLAG was set to "native" (as opposed to "green") and off you went.
Some JDKs, while installing, will preset this environment variable in the wrapper script that launches the VM. In other cases, you may have to set it in your .cshrc or .profile file for it to take effect. There is also the option of launching java and javac with a -native flag (used to be the case with the older JDKs, I'm fairly sure that the new JDKs dont support it by default) or a -green flag.
Never had a need for doing this on NT4/Win2k, perhaps the default thread type is native.
Please check the sun site for any documentation that may be relevant.
Hope that helps...
Raj -
GREEN THREADS ,NATIVE THREADS[ Go to top ]
- Posted by: rex rex
- Posted on: January 30 2001 02:28 EST
- in response to Raj Rajen
raj thk's a lot