일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- tomcat
- port
- ssh
- netsh
- Windows 10
- VirtualBox
- xargs
- profile
- plugin
- vscode
- web.xml
- Quartz
- 단축키
- context
- Mac
- resource
- import
- GIT
- 네트워크
- find
- Windows
- bash
- Eclipse
- 줄바꿈 문자
- lsof
- grep
- Source
- IntelliJ
- JavaScript
- maVen
- Today
- Total
목록Dev/Java (163)
develog
E:\workspace\test_Zip>jar cvf aa.jar -C src .
System.getProperty("line.separator")
import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream; public class TestMain { public static void main(String[] args) {System.out.println("START");System.out.println("-----------------------------------");fileCopyTest("assets/aa.zip", "assets/bb.zip");fileCopyTest("asse..
private String getCustomDate(String yyyymmdd) { int year = Integer.parseInt(yyyymmdd.substring(0, 4)); int month = Integer.parseInt(yyyymmdd.substring(4, 6)); int date = Integer.parseInt(yyyymmdd.substring(6, 8)); Calendar cal = Calendar.getInstance(); cal.set(year, month - 1, date); cal.add(Calendar.YEAR, -1); // 1년 전 cal.add(Calendar.MONTH, -1); // 한달 전 cal.add(Calendar.DATE, -1); // 하루 전 Simp..
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");System.out.prinltn(formatter.format(new Date())); // output// 2012-05-10 11:25:17
1. Thread 작성 - Thread 를 상속받거나 : class MyThread extends Thread - Runnable 를 구현하거나 : class MyTask implements Runnable 2. Thread 실행 Thread t = new MyThread(); t.start(); Thread t = new Thread(new MyTask()); t.start(); 3. Thread 작업내용 작성 @Override public void run() { // 작업내용 작성 } 4. 일정시간 대기 Thread.sleep(3000); // 3초간 대기