Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java_¹ÜµÀÊäÈëÊä³öÁ÷ʾÀý

package javatest_danny;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
public class pipeStreamTest {
 public static void main(String[] args) {
  try
  {
         java.io.PipedInputStream pin=new PipedInputStream();
         java.io.PipedOutputStream pout=new PipedOutputStream();
         pin.connect(pout);
         pipein pi=new pipein(pin);
         pipeout po=new pipeout(pout,"hello,i am danny chen.nice to meet you!");
         pi.start();
         po.start();
  }
  catch(Exception e)
  {
   
  }
   
 }
}
class pipein extends Thread
{
 private PipedInputStream pin;
    pipein(PipedInputStream pin)
    {
     this.pin=pin;
    }
    public void run()
    {
     try
     {
         int data;
         while((data=pin.read())!=-1)
         {
          System.out.print((char)data);
         }
           
     }
     catch(Exception e)
     {
       
     }
    }
}
class pipeout extends Thread
{
 private PipedOutputStream pout;
 private byte bs[];
 pipeout(Pip


Ïà¹ØÎĵµ£º

ÔÚLinuxÖÐʹÓÃJava Console

The
Java Console provides information about the Java Runtime Environment
(JRE) version, user home directory, and any error message that occurs
while running an applet or application. You can enable the Java Console
for the Linux platform.









......

ÓÃÓÚWEBÓ¦ÓõÄJava¼¼Êõ¼ò½é


×÷ÕߣºDana Nourie£¬2006.11
·­Ò룺ïúÖ¾¹ú£¬2009.12
Äã¿ÉÒÔÔÚInternetÉÏ¿´µ½µ½´¦¶¼ÊÇWEBÓ¦Óᣴ󲿷ֵÄWEBÓ¦ÓÃÓÃÀ´´¦ÀíÔÚÏß±íµ¥£¬Í¶Æ±£¬´¦ÀíÔÚÏßÉ̵궩µ¥£¬º½°àÔ¤¶©£¬»òÕßÊǼòµ¥µØÏÔʾÓû§µÇ¼
Ãû³Æ¡£ÄÇô£¬´´½¨WEBÓ¦ÓÃʱÓõ½ÄÄЩJava¼¼ÊõÄØ£¿ÄãÐèÒªµ¼ÈëÄÄЩ°üÄØ£¿ÕâЩҪ¿´Äã´´½¨µÄÊÇÄÄÖÖWEBÓ¦ÓÃÒÔ¼°Ëü×öʲô¶ø¶¨¡£
± ......

javaÔËÐÐÍⲿ³ÌÐò

public class RunExtraProgram {
 /**
  * @param args
  */
 public static void main(String[] args) {
  // TODO Auto-generated method stub
  try {
   Runtime.getRuntime().exec("D:\\Program Files\\TTPlayer\\TTPlayer.exe");
  } catc ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ