JAVA79 [ JAVA ] 자바 HTTPS 통신 SSL 통신인 https 를 하기 위해서는 일반적으로 자바로 http 로 통신하는 방법에서 조금 더 응용이 필요하다. 활용 가능한 코드를 남겨본다. /** * 용도: https 실행 * 파라미터: 없음 * 작성자 : 정윤재 */ public static void main(String[] args) { // TODO Auto-generated method stub String url = " https://www.ea-pass.konami.net/mypage/login.do "; String responseMessage = ""; InputStream is = null; InputStreamReader isr = null; BufferedReader br = null; StringBuffer sb = new.. 2010. 10. 30. [ JAVA ] 리눅스에서 자바 어플리케이션 프로그램 실행 (jar 파일 실행) 리눅스에서 자바 프로그램을 실행시키려면 classpath 문제도 있고 package 안에 들어 있는 경우 com.innoace 와 같이 depth 가 있는 경우 실행을 어떻게 해야 할까 라는 문제에 봉착하게 된다. 그럴때 해결 방법이 이클립스에서 Runnable jar 파일로 자바 프로젝트 자체를 export 하면 된다. 1. 이클립스에서 프로젝트를 export 한다 2. export 할 때 Runnable jar 파일로 export 를 한다. 3. main 함수가 들어있는 곳과 package 에 path 가 잡혀 있는 jar 파일들(라이브러리) 까지 포함 4. console 화면에서 java -jar xxx.jar args 를 쳐서 실행시킨다. 화면은 윈도우 화면을 썻지만 리눅스에서 안될 이유가 없다... 2010. 10. 28. [ JAVA ] e.printStackTrace() 찍어보기 인터넷에서 검색을 하다가 okjsp 에서 명 이라는 분이 올리신 코드를 보고 올려봅니다.log로 e.printStackTrace() 을 보고 싶을때 참고할 수 있는 코드 인 것 같습니다. import java.io.ByteArrayOutputStream; import java.io.PrintStream; public class GetPrintStackTraceIntoString { public static void main(String[] args) { Exception e = new Exception("my exception"); ByteArrayOutputStream out = new ByteArrayOutputStream(); PrintStream pinrtStream = new PrintStrea.. 2010. 3. 25. [ Java ] 외부 실행파일 (exe 등) 실행 Runtime rt=Runtime.getRuntime(); String exec1="\""+root+"m_imagefusion.exe"+"\""; //m_imageFusion.exe 실행 System.out.println("exec1============>"+exec1); String exec2 = "abc"; //exec2 는 argument, 즉 인자임 String exec=exec1+" "+exec2; //전체 실행 구문 보기 System.out.println("exec==============>"+exec); Process pr=rt.exec(exec); //웹의 루트경로의 m_imagefusion.exe + data폴더의 이미지 폴더 경로 + 업로드될 파일 경로 + 합성될 파일 (이건 예전 프로.. 2010. 2. 23. 이전 1 ··· 8 9 10 11 12 13 14 ··· 20 다음