Today i’m going show how to open a pdf file using java code.
import java.io.IOException; public class PDFopen { public static void main(String[] args) { try { String cmds[] = new String[]{"cmd", "/c","Your File Path\\PDF_NAME.pdf"}; Runtime.getRuntime().exec(cmds); } catch (Exception e) { System.out.println(e); } } }
good job bro.. keep it up
LikeLike