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

JAVAÈçºÎµ÷ÓÃexe»òÕßÅú´¦ÀíÎļþ

/**
* JavaExec.java version 1.0 Feb 22, 2010
*/

import java.lang.Runtime;
import java.lang.Process;
import java.io.InputStreamReader;
import java.lang.Exception;
import java.io.*;
public class JavaExec {
/**
* @param args
* @author Eric Yang
* @
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

JavaExec javaExec = new JavaExec();
javaExec.testProcess();
}

public void testProcess()
{
try
{

String home="c:/process";
String command = "bfimport.bat -U yq -P qq -x bfimport_71.xml -p";
String[] cmd = new String[] { "cmd.exe", " ", "bfimport.bat" };
File dir = new File(home);
//Process process = Runtime.getRuntime().exec(command,null, dir);
Process process = Runtime.getRuntime().exec(command);

/*TestInputStream errorStream = new TestInputStream(process
.getErrorStream());
errorStream.start();*/
InputStream inputStream = process.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));

String line = null;
while ((line = reader.readLine()) != null) {
System.out.println(line);
}
//int exitValue = process.waitFor();
//System.out.println("Return Value:" + exitValue);
process.getOutputStream().close();
}
catch(IOException e)
{
System.out.println("IOException ");

ÐÞ¸ÄÆäÖеÄcommand¾Í¿ÉÒÔÁË
ÉÏÃæµÄÀý×Óȷʵ¿ÉÒÔ»ñµÃһЩÊä³ö£¬µ«ÊÇÓкܶàÇé¿öÒ²ÎÞ·¨»ñÈ¡£¬Ôٲο¼ºÜ¶àʵÀýÖ®ºó£¬ÏÂÃæµÄÀý×Ó×îÇ¿´ó£¬¼¸ºõ¿ÉÒÔ²¶»ñËùÓÐÀàÐ͵ÄÃüÁîÐÐÊä³ö¡£
/**
* JavaExec.java version 1.0 Feb 22, 2010
*/

import java.lang.Runtime;
import java.lang.Process;
import java.io.InputStreamReader;
import java.lang.Exception;


Ïà¹ØÎĵµ£º

java ÐòÁл¯£¨Serializable£©

1.Java ÐòÁл¯¼¼Êõ¿ÉÒÔʹÄ㽫һ¸ö¶ÔÏóµÄ״̬дÈëÒ»¸öByte Á÷À²¢ÇÒ¿ÉÒÔ´ÓÆäËüµØ·½
°Ñ¸ÃByte Á÷ÀïµÄÊý¾Ý¶Á³öÀ´¡£ÖØÐ¹¹ÔìÒ»¸öÏàͬµÄ¶ÔÏó¡£ÕâÖÖ»úÖÆÔÊÐíÄ㽫¶ÔÏóͨ¹ýÍøÂç
½øÐд«²¥£¬²¢¿ÉÒÔËæÊ±°Ñ¶ÔÏó³Ö¾Ã»¯µ½Êý¾Ý¿â¡¢ÎļþµÈϵͳÀï¡£JavaµÄÐòÁл¯»úÖÆÊÇRMI¡¢
EJB¡¢JNNIµÈ¼¼ÊõµÄ¼¼Êõ»ù´¡
2.²¢·ÇËùÓеÄJava Àà¶¼¿ÉÒÔÐòÁл¯ ......

JavaÖеĶÑÕ»

Java ÖеĶѺÍÕ»
Java°ÑÄÚ´æ»®·Ö³ÉÁ½ÖÖ£ºÒ»ÖÖÊÇÕ»Äڴ棬һÖÖÊǶÑÄÚ´æ¡£
ÔÚº¯ÊýÖж¨ÒåµÄһЩ»ù±¾ÀàÐ͵ıäÁ¿ºÍ¶ÔÏóµÄÒýÓñäÁ¿¶¼ÔÚº¯ÊýµÄÕ»ÄÚ´æ
ÖзÖÅä
¡£
µ±ÔÚÒ»¶Î´úÂë¿é¶¨ÒåÒ»¸ö±äÁ¿Ê±£¬Java¾ÍÔÚÕ»ÖÐΪÕâ¸ö±äÁ¿·ÖÅäÄÚ´æ¿Õ¼ä£¬µ±³¬¹ý±äÁ¿µÄ×÷ÓÃÓòºó£¬Java»á×Ô¶¯ÊͷŵôΪ¸Ã±äÁ¿Ëù·ÖÅäµÄÄÚ´æ¿Õ¼ä£¬
¸ÃÄÚ´æ¿Õ¼ä¿ÉÒÔÁ¢¼´± ......

PermGen space Java heap space ÄÚ´æÒç³ö


1¡¢
PermGen spaceµÄÈ«³ÆÊÇPermanent Generation space,ÊÇÖ¸ÄÚ´æµÄÓÀ¾Ã±£´æÇøÓòOutOfMemoryError: PermGen space´Ó±íÃæÉÏ¿´¾ÍÊÇÄÚ´æÒæ³ö£¬½â¾ö·½·¨Ò²Ò»¶¨ÊǼӴóÄڴ档˵˵Ϊʲô»áÄÚ´æÒæ³ö£ºÕâÒ»²¿·ÖÓÃÓÚ´æ·ÅClassºÍMetaµÄÐÅÏ¢,ClassÔÚ±» LoadµÄʱºò±»·ÅÈëPermGen spaceÇøÓò£¬ËüºÍºÍ´æ·ÅInstanceµÄHeapÇøÓò²»Í¬,GC(Garba ......

Java ÖÐ Vector¡¢ArrayList¡¢List ʹÓÃÉîÈëÆÊÎö


ÏßÐÔ±í£¬Á´±í£¬¹þÏ£±íÊdz£ÓõÄÊý¾Ý½á¹¹£¬ÔÚ½øÐÐJava¿ª·¢Ê±£¬JDKÒѾ­ÎªÎÒÃÇÌṩÁËһϵÁÐÏàÓ¦µÄÀàÀ´ÊµÏÖ»ù±¾µÄÊý¾Ý½á¹¹¡£ÕâЩÀà¾ùÔÚjava.util°üÖС£±¾ÎÄÊÔͼͨ¹ý¼òµ¥µÄÃèÊö£¬Ïò¶ÁÕß²ûÊö¸÷¸öÀàµÄ×÷ÓÃÒÔ¼°ÈçºÎÕýȷʹÓÃÕâЩÀà¡£ 
Collection
©ÀList
©¦©ÀLinkedList
©¦©ÀArrayList
©¦©¸Vector
©¦¡¡©¸Stack
©¸Set
M ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ