import java.io.File;
import java.io.IOException;
public class ScreenshotDemo{
// 工具所在根目录
private static String root = "E:\\cut\\截图工具";
private static String jsPath = root + File.separator + "screenshot.js ";
private static String exePath = root + File.separator + "phantomjs.exe";
// 调用phantomjs程序,并传入js文件,并通过流拿回需要的数据。
public static void getParseredHtml2(String url,String path) throws IOException{
Runtime rt = Runtime.getRuntime();
Process p = rt.exec(exePath + " " + jsPath + " " + url+" "+path);
}
}