일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- OS
- WebLogic
- 이승철
- 미국드라마
- spring3.0
- Ant
- php
- ThinkFree
- Swing
- Linux
- Java5
- 판매
- Java
- PSP
- Mac
- Programing
- Programming
- 부동산
- 요리
- db
- 육아
- 독서
- WebService
- 효민이
- 중고
- 행복이
- Vista
- Spring
- Eclipse
- 책
Archives
- Today
- Total
Bitaholic
Java에서 현재 디렉토리 경로 알아오기.. 본문
import java.io.File; public class CurrentDir { public static void main (String args[]) {File dir1 = new File ("."); File dir2 = new File ("..");try { System.out.println ("Current dir : " +dir1.getCanonicalPath()); System.out.println ("Parent dir : " +dir2.getCanonicalPath()); } catch(Exception e) { e.printStackTrace(); } } }
Comments