프로그램 |
실행 |
작업관리자 |
taskmgr |
원격 데스크탑 연결 |
mstsc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'Windows' 카테고리의 다른 글
[Windows] - 명령 프롬프트(Command Prompt) 명령어 (0) | 2014.09.08 |
---|
프로그램 |
실행 |
작업관리자 |
taskmgr |
원격 데스크탑 연결 |
mstsc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Windows] - 명령 프롬프트(Command Prompt) 명령어 (0) | 2014.09.08 |
---|
<?xml version='1.0' encoding='UTF-8'?> <weblogic-web-app xmlns="http:⁄⁄xmlns.oracle.com⁄weblogic⁄weblogic-web-app" xmlns:xsi="http:⁄⁄www.w3.org⁄2001⁄XMLSchema-instance" xsi:schemaLocation="http:⁄⁄xmlns.oracle.com⁄weblogic⁄weblogic-web-app http:⁄⁄xmlns.oracle.com⁄weblogic⁄weblogic-web-app⁄1.0⁄weblogic-web-app.xsd"> <session-descriptor> <timeout-secs>3600<⁄timeout-secs> <invalidation-interval-secs>60<⁄invalidation-interval-secs> <persistent-store-type>memory<⁄persistent-store-type> <url-rewriting-enabled>true<⁄url-rewriting-enabled> <⁄session-descriptor> <jsp-descriptor> <page-check-seconds>5<⁄page-check-seconds> <precompile>false<⁄precompile> <keepgenerated>false<⁄keepgenerated> <encoding>utf-8<⁄encoding> <⁄jsp-descriptor> <charset-params> <input-charset> <resource-path>⁄*<⁄resource-path> <java-charset-name>utf-8<⁄java-charset-name> <⁄input-charset> <⁄charset-params> <container-descriptor> <show-archived-real-path-enabled>true<⁄show-archived-real-path-enabled> <⁄container-descriptor> <context-root>⁄<⁄context-root> <⁄weblogic-web-app>
아래 JSP Code는 System property 목록들을 Table 형태로 출력한 부분입니다.
<%@ page language="java" contentType="text⁄html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page import="java.util.*;"%> <!DOCTYPE html PUBLIC "-⁄⁄W3C⁄⁄DTD HTML 4.01 Transitional⁄⁄EN" "http:⁄⁄www.w3.org⁄TR⁄html4⁄loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text⁄html; charset=UTF-8"> <link rel="stylesheet" href=".⁄css⁄bootstrap.css"> <link rel="stylesheet" href=".⁄css⁄bootstrap-responsive.css"> <⁄head> <body> <div style="margin-left:40px; margin-right: 40px;"> <h2>Description<⁄h2> <p> The <strong>java.lang.System.getProperties()<⁄strong>method determines the current system properties. The current set of system properties for use by the getProperty(String) method is returned as a Properties object. If there is no current set of system properties, a set of system properties is first created and initialized. This set of system properties includes values for the following keys: <⁄p> <div> <table class="table"> <thead> <tr> <th width="10%" style="text-align:center">No<⁄th> <th width="15%" style="text-align:center">Key<⁄th> <th width="75%" style="text-align:center">Value<⁄th> <⁄tr> <⁄thead> <⁄table> <⁄div> <!-- Table Header --> <div style="width: 100%; height:300px; overflow-y:auto; overflow-x: hidden;"> <table class="table"> <tbody> <% Map<String, String> env = System.getenv(); int index = 1; for (String key : env.keySet()) { %> <tr> <td width="10%" style="text-align:center"><%= index++ %><⁄td> <td width="15%" ><%= key %><⁄td> <td width="75%" ><%= env.get(key) %><⁄td> <⁄tr> <% } %> <⁄tbody> <⁄table> <⁄div> <⁄div> <script src=".⁄js⁄jquery-1.11.1.js"><⁄script> <script src=".⁄js⁄bootstrap.js"><⁄script> <⁄body> <⁄html>
[HTML] - HTML 타이틀 아이콘 적용 방법 (0) | 2014.09.27 |
---|---|
[HTML] - HTML 자바스크립트(JavaScript) 적용방법 (0) | 2014.09.08 |
[HTML] - HTML 스타일시트(Cascading Style Sheet) 적용방법 (0) | 2014.09.08 |
File file = new File("C:\\Program Files\\Java"); System.out.println(new java.util.Date(file.lastModified())); file = new File("C:\\Program Files\\Java\\jdk1.8.0_20\\src.zip"); System.out.println(new java.util.Date(file.lastModified()));
[JAVA] - Properties File 읽기 (0) | 2015.01.25 |
---|---|
[JAVA] - Swing JScrollPane 스크롤 (0) | 2015.01.21 |
[JAVA] - TimerTask 클래스를 이용한 스케쥴링(Scheduling) (0) | 2014.11.14 |
[JAVA] - 배열 복사 방법 (0) | 2014.11.02 |
[JAVA] - SQLite Connection (0) | 2014.09.21 |
지정한 시간이 되면 지정되어 있는 폴더안의 파일들을 지우는 스케쥴러를 구현해 보도록 하겠습니다.
package Scheduler; import java.io.File; class FileCleaner { public static void deleteFolder(String path) { File folder = new File(path); if (folder.isDirectory()) { File[] files = folder.listFiles(); for (File file : files) { if (file.isDirectory()) { FileCleaner.deleteFolder(file.getPath()); } file.delete(); } } } }
FileCleaner 클래스의 deleteFolder 메소드는 해당 폴더를 지우는 작업을 합니다. 폴더일경우 다시 자기자신을 호출하여 파일들을 지웁니다. 해당경로의 폴더를 다 지울때까지 재귀적인 메소드 호출은 계속됩니다.
package Scheduler; import java.util.TimerTask; class FileDeleteScheduler extends TimerTask { private String folderPath; public void setFolderPath(String folderPath) { this.folderPath = folderPath; } public void run() { FileCleaner.deleteFolder(folderPath); } }
FileDeleteScheduler는 해당시간이 되면 폴더안의 파일들을 삭제하는 작업을 수행합니다.
package Scheduler; import java.util.Calendar; import java.util.Date; import java.util.Timer; class Scheduler { private Timer timer; private FileDeleteScheduler fileDeleteScheduler; public Scheduler() { timer = new Timer(); fileDeleteScheduler = new FileDeleteScheduler(); } public void start() { fileDeleteScheduler.setFolderPath("C:\\Test");; Calendar cal = Calendar.getInstance(); cal.set(Calendar.AM_PM, Calendar.AM); cal.set(Calendar.HOUR, 5); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); timer.scheduleAtFixedRate(fileDeleteScheduler, cal.getTime(), 1000 * 60 * 60 * 24 * 2); } }
새벽 5시를 기점으로 작업이 진행되고 이틀간격으로 해당 위치의 폴더안의 파일들을 삭제하는 스케쥴러가 되겠습니다.
[JAVA] - Swing JScrollPane 스크롤 (0) | 2015.01.21 |
---|---|
[JAVA] - File 최종 수정일 알기 (0) | 2014.11.15 |
[JAVA] - 배열 복사 방법 (0) | 2014.11.02 |
[JAVA] - SQLite Connection (0) | 2014.09.21 |
[JAVA] - 파일(File) 무조건 생성하기 (0) | 2014.09.19 |
데이터 정의어(Data Definition Language)
데이터 조작어(Data Manipulation Language)
데이터 제어어(Data Control Language)
[SQLite] - SQLite 개발툴(Development Tool) 주소 (0) | 2014.11.06 |
---|
[SQLite] - 기본 SQL(Structured Query Language) 명령어 (0) | 2014.11.13 |
---|
Application Data /
Files and Folders /
Destination Computer /
Show Predefined Folder /
시스템폴더 속성(Property)와 경로(Path)가 상세하게 기술되어있습니다.
http://www.advancedinstaller.com/user-guide/folder-paths.html
[InstallShield] - Dynamic File Link, File Add 비교 (0) | 2015.03.11 |
---|
public class ArrayCopyTest { public static void main(String[] args) { int[] arr = {1, 2, 3, 4, 5}; int[] arrClone = arr.clone(); arrClone[0] = 6; System.out.println("arrClone"); printArray(arrClone); int[] arrCopy = new int[arr.length]; System.arraycopy(arr, 0, arrCopy, 0, arr.length); arrCopy[1] = 6; System.out.println("arrCopy"); printArray(arrCopy); } public static void printArray(int[] arr) { System.out.println(java.util.Arrays.toString(arr)); } }
[JAVA] - File 최종 수정일 알기 (0) | 2014.11.15 |
---|---|
[JAVA] - TimerTask 클래스를 이용한 스케쥴링(Scheduling) (0) | 2014.11.14 |
[JAVA] - SQLite Connection (0) | 2014.09.21 |
[JAVA] - 파일(File) 무조건 생성하기 (0) | 2014.09.19 |
[JAVA] - CharSequence 사용법 (0) | 2014.09.08 |
#include <stdio.h> #pragma warning(disable:4715) typedef enum { Ascending, Descending } SORT_COMPARE_TYPE; typedef int (*fnSortCompare)(int[], int, int); fnSortCompare getFuncCompare(SORT_COMPARE_TYPE sortCompareType); int AscCompare(int Arr[], int i, int j); int DescCompare(int Arr[], int i, int j); void Swap(int Arr[], int i, int j); void Sort(int Arr[], int nSize, SORT_COMPARE_TYPE sortCompareType); void PrintAll(int Arr[], int nSize); int main(void) { int Arr[] = {10, 50, 40, 70, 90, 100, 20, 30, 80, 60}; int nSize = sizeof(Arr) / sizeof(Arr[0]); printf("Sort Before......\n"); PrintAll(Arr, nSize); Sort(Arr, nSize, /* SORT_COMPARE_TYPE */ Ascending); printf("Sort After......\n"); PrintAll(Arr, nSize); return 0; } fnSortCompare getFuncCompare(SORT_COMPARE_TYPE sortCompareType) { switch (sortCompareType) { case Ascending: return AscCompare; case Descending: return DescCompare; } } void Sort(int Arr[], int nSize, SORT_COMPARE_TYPE sortCompareType) { int i = 0, j = 0; fnSortCompare sortCompare = getFuncCompare(sortCompareType); for (; i < nSize - 1; i++) { for (j = i + 1; j < nSize; j++) { if (sortCompare(Arr, i, j) > 0) { Swap(Arr, i, j); } } } } int AscCompare(int Arr[], int i, int j) { return Arr[i] > Arr[j]; } int DescCompare(int Arr[], int i, int j) { return Arr[i] < Arr[j]; } void Swap(int Arr[], int i, int j) { int nTemp = Arr[i]; Arr[i] = Arr[j]; Arr[j] = nTemp; } void PrintAll(int Arr[], int nSize) { int i = 0; for (; i < nSize; i++) { printf("[%d]", Arr[i]); } printf("\n"); }
[C] - 환경변수 출력 (0) | 2014.09.08 |
---|---|
[C] - const 포인터 사용법 (0) | 2014.09.08 |
[C] - 스캔셋(Scanset) (0) | 2014.09.08 |
[C] - scanf() 함수 (0) | 2014.09.08 |
[C] - getchar(), _getch(), _getche() 차이점 (0) | 2014.09.08 |