본문 바로가기

삽질하기

자바(java) System Properties System Property Description java.version Java Runtime Environment version java.vendor Java Runtime Environment vendor java.vendor.url Java vendor URL java.home Java installation directory java.vm.specification.version Java Virtual Machine specification version java.vm.specification.vendor Java Virtual Machine specification vendor java.vm.specification.name Java Virtual Machine specification name.. 더보기
자바(Java) Reflect 예제 ReflectMethod.java package reflect; public class ReflectMethod { //field public String field; //constructor public ReflectMethod() {} public ReflectMethod(String field) { this.field = field; } //method public String getField() { System.out.println("call field : " + this.field); return this.field; } public void methodA() { System.out.println("call method A"); } public void methodB(String str) { S.. 더보기
자바(Java) 사용자 정의 Exception 처리 임의 문자열 변수를 읽어서 차례대로숫자이면 출력하고 숫자가 아니면 에러메시지를 출력하는 심플한 예제이다. 에러 메시지 출력시 해당문자와 위치를 출력하도록 하였다. 1. 사용자 Exception 정의하기 오류 발생시 출력할 메시지나 처리할 데이터 등을 생성자를 통해 인자로 받아 객체를 생성한다. public class UserException extends Exception { private char character; private int position; public UserException(char character, int position) { this.character = character; this.position = position; } @Override public String getMess.. 더보기
Java Compile Option 낮은 버전으로 컴파일 javac -source .java 더보기
유니코드 범위목록 - 위키백과 0000 007F Controls and Basic Latin 제어 문자와 라틴 기본 0080 00FF Controls and Latin-1 Supplement 제어 문자와 라틴 보충 0100 017F Latin Extended-A 라틴 확장-A 0180 024F Latin Extended-B 라틴 확장-B 0250 02AF IPA Extensions 국제 음성 기호 확장 02B0 02FF Spacing Modifier Letters 조정 문자 0300 036F Combining Diacritical Marks 조합 분음 기호(악센트) 0370 03FF Greek and Coptic 그리스어와 콥트어 0400 04FF Cyrillic 키릴 자모 0500 052F Cyrillic Supplementary .. 더보기
Flex 사용자정의 Event 와 EventDispatcher의 사용 package user.event { import flash.events.Event; public class UserEvent extends Event { public static const USER_EVENT:String = "USER_EVENT"; public var arg1:String; public var arg2:int; public function UserEvent(type:String, arg1:String, arg2:int) { super(type, false, false); this.arg1 = arg1; this.arg2 = arg2; } } } //Event를 상속받은 클래스를 생성한다. //이벤트명을 지정하고 Event 발생시 사용할 변수들을 선언한다. package user.eve.. 더보기
Flex Singleton Pattern package { public class MyClass { private static var _instance:MyClass public function MyClass(enforcer:SingletonEnforcer) { } public static function getInstance():MyClass { if(MyClass._instance == null) { MyClass._instance = new MyClass(new SingletonEnforcer()); } } } } class SingletonEnforcer {} var instance:MyClass = MyClass.getInstance(); 더보기
Sun Java System application Server 설치 중 경로설정에서 멈춤 현상 Problem: Windows installation hangs after clicking “Next” button on installation directory selection screen There are several potential causes for this problem with corresponding workarounds: Available port verification which occurs at this stage of installation is taking long time due to system firewall settings and in worst case scenario installer cannot find any available ports which could be.. 더보기