개발자 공부방/JAVA(3)
-
JAVA 에서 FILE 유무 체크
JAVA 에서 FILE 유무 체크하는 로직 123456789101112131415161718192021222324252627package test1; import java.io.File; public class fileCheck { public static void main(String[] args) { String fileName = "D:\\test.txt"; checkFile(fileName); } private static void checkFile(String FileName) { File f = new File(FileName); System.out.println("FileName : " + FileName); // 파일인지 판단 if (f.isFile()) { System.out.printl..
2013.06.13 -
[JAVA]HOST IP 구하기 소스
JAVA HOST IP 구하기 소스 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 import java.net.*; public class test { public static void main(String[]args) { InetAddress ip = null; try{ ip = InetAddress.getLocalHost(); //HostName출력 System.out.println("getLocalHost() : " + ip.getHostName()); //IP출력 System.out.println("getHostAddress() : " + ip.getHostAddress()); }catch(UnknownHostException e){ e.printStackT..
2013.05.20 -
Signed Applet
보호되어 있는 글입니다.
2011.08.04