일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 미국드라마
- 이승철
- spring3.0
- WebService
- 판매
- 요리
- php
- ThinkFree
- Java5
- 행복이
- 중고
- Ant
- Eclipse
- 효민이
- 부동산
- Programming
- Programing
- PSP
- 책
- Mac
- Linux
- Java
- WebLogic
- Vista
- db
- 육아
- OS
- Spring
- Swing
- 독서
Archives
- Today
- Total
목록2006/11/17 (2)
Bitaholic
이클립스로 자바 프로젝트를 만들어 사용할 때.. 옵션을 주어 소스 디렉토리랑 바이너리 디렉토리로 나눌 수 있다. 처음 프로젝트를 생성하면 아래와 같이 기본적인 폴더 2개와 프로젝트 파일, 클래스패스 파일이 생긴다. 예를 들어 이미지를 읽어들여 패널의 배경으로 쓰는 간단한 예제를 만들었을 때 이미지는 images라는 폴더에 넣어서 imaages폴더를 src밑에 소스들과 같이 두고 아래와 같이 ImagePanel panel = new ImagePanel(new ImageIcon("image/background.png").getImage)); 상대경로를 적으면 절대로 이미지를 읽어오지 못한다. 왜냐하면 project 의 기본경로가 project파일이 있는 폴더 이기 때문이다. 소스가 있는 곳이 절대 아니다. ..
Computer/Java
2006. 11. 17. 20:55
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(); } } }
Computer/Java
2006. 11. 17. 20:40