Àß µÇ´Âµ¥¿ä...


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :À±°æ±¸ 1999³â 10¿ù 06ÀÏ 15:01:13

In Reply to: ÀÚ¹Ù·Î ÀÚ¹ÙÄÄÆÄÀÏ·¯ ½ÇÇàÀÌ Á¦´ë·Î ¾ÈµÇ¿ä posted by °­¼ºÀÏ on 1999³â 10¿ù 05ÀÏ 03:09:59:

¹º°¡ À߸ø ÄÚµùÇϽŠ°Í °°±º¿ä.
¿¹¿Ü ³»¿ëÀ» Ãâ·ÂÇÏ¿© ºÐ¼®Çغ¸½Ã´Â °Ô ÁÁ°Ú½À´Ï´Ù.
Á¦°¡ »ç¿ëÇÑ ¿¹Á¦ÀÔ´Ï´Ù.

import java.io.*;

public class compile {

public static void main(String args[]){

if (args.length < 1) { System.out.println("Usage : java compile <java source file>"); System.exit(1); } Runtime rt = Runtime.getRuntime(); System.out.println("START!"); Process ps = null;

try{ String cmd = "/usr/bin/javac"; for (int i=0; i<args.length; i++) cmd = cmd+" "+args[i]; ps = rt.exec(cmd); } catch (Exception e) {

System.out.println("Error occurred!"+ e.toString()); } try { BufferedReader br=new BufferedReader(new InputStreamReader(new SequenceInputStream(ps.getInputStream(), ps.getErrorStream()))); PrintWriter pr = new PrintWriter(ps.getOutputStream()); String str=null;

while ((str=br.readLine())!=null) { System.out.println("PARENT READ:"+str); }

} catch (IOException ie) {

System.out.println("Error occurred!"+ ie.toString()); System.out.println("EXIT VALUE="+ps.exitValue());

} try { System.out.println("WAIT EXIT VALUE="+ps.waitFor()); } catch (InterruptedException ire) { System.out.println("Error occurred!"+ ire.toString()); } } }




´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
HTML ÅÂ±× Æ÷ÇÔ ¿©ºÎ: HTML ¹®¼­ÀÏ °æ¿ì üũ
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]