리눅스(linux) 탭(tab) 자동완성 기능 구현


리눅스(linux) 탭(tab) 자동완성 기능 구현

Process process2 = null; int len, sLen = 0, count=0; String []s = null; String after = null; String before = null; String[] cmd = { "/bin/sh", "-c", "ls -dF " + path + "*" }; try { process2 = Runtime.getRuntime().exec(cmd); process2.waitFor(); byte[] msg = new byte[3000]; while((len=process2.getInputStream().read(msg)) >= 0){ s = new String(msg, 0, len).split("\n"); } process2.exitValue(); process2.destroy(); if( s!= null ) { for( int zz=0; zz<s.length; zz++){ System.out.println("*** : " + s[zz]...


#IT·컴퓨터

원문링크 : 리눅스(linux) 탭(tab) 자동완성 기능 구현