[Java] Class<?> 의 의미?

Java/Java 2013. 1. 21. 11:18

링크 : http://docs.oracle.com/javase/tutorial/java/generics/wildcards.html 

 

 

Wildcards

In generic code, the question mark (?), called the wildcard, represents an unknown type. The wildcard can be used in a variety of situations: as the type of a parameter, field, or local variable; sometimes as a return type (though it is better programming practice to be more specific). The wildcard is never used as a type argument for a generic method invocation, a generic class instance creation, or a supertype.

The following sections discuss wildcards in more detail, including upper bounded wildcards, lower bounded wildcards, and wildcard capture.

'Java > Java' 카테고리의 다른 글

[Java] JDK Download  (0) 2013.04.02
[Java] Creating Custom Annotations and Using Them  (0) 2013.01.21
[Java] JConsole 연결 옵션  (0) 2013.01.05
[Java] Java 모니터링 툴 VisualVM Download  (0) 2012.12.28
[java] Heap Memory Size 구하기  (0) 2012.12.26
posted by 뚱2

[Java] JConsole 연결 옵션

Java/Java 2013. 1. 5. 22:04

 

VM 옵션을 준다.

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=12345
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false 

 

위와 같이 하면은 12345 포트로 로그인된다.

posted by 뚱2

링크 : http://visualvm.java.net/download.html 

posted by 뚱2

[java] Heap Memory Size 구하기

Java/Java 2012. 12. 26. 20:31

링크 : http://viralpatel.net/blogs/getting-jvm-heap-size-used-memory-total-memory-using-java-runtime/

/**

* Class: TestMemory

* @author: Viral Patel

* @description: Prints JVM memory utilization statistics

*/

public class TestMemory {

     

    public static void main(String [] args) {

         

        int mb = 1024*1024;

         

        //Getting the runtime reference from system

        Runtime runtime = Runtime.getRuntime();

         

        System.out.println("##### Heap utilization statistics [MB] #####");

         

        //Print used memory

        System.out.println("Used Memory:"

            + (runtime.totalMemory() - runtime.freeMemory()) / mb);

 

        //Print free memory

        System.out.println("Free Memory:"

            + runtime.freeMemory() / mb);

         

        //Print total available memory

        System.out.println("Total Memory:" + runtime.totalMemory() / mb);

 

        //Print Maximum available memory

        System.out.println("Max Memory:" + runtime.maxMemory() / mb);

    }

}


posted by 뚱2

링크 : http://aircook.tistory.com/69 



참고(Jeus ClassLoader) : http://testing.pe.kr/xe/index.php?mid=computer_01&listStyle=webzine&page=4&document_srl=333&sort_index=readed_count&order_type=asc 

posted by 뚱2
* Java Interactive Profiler
링크 : http://greatkim91.tistory.com/114 (Jeus에서 징하게 연결안된다.)

-javaagent:C:/SEED/jip-src-1.1.1/profile/profile.jar
-Dprofile.properties=C:/SEED/jip-src-1.1.1/profile/webapp.profile.properties

 




* TPTP

참고 : http://antop.tistory.com/135

원격지 : http://antop.tistory.com/136

 

* yourkit

링크 : http://www.yourkit.com/download/index.jsp 

 

* jvmmonitor

링크 : http://code.google.com/a/eclipselabs.org/p/jvmmonitor/

Getting Start : http://www.jvmmonitor.org/doc/index.html#Getting_started 

 

* Netbeans Profiler

링크 : http://profiler.netbeans.org/download/prev/551.html 

 

 

posted by 뚱2

링크 : http://blog.daum.net/onjsystems/274


posted by 뚱2

링크 : http://msdn.microsoft.com/ko-kr/library/ms378422.aspx

 

JDK 1.4.2에서는 sqljdbc 1.2만 지원된다. ㅡㅡ;

sqljdbc2, 4는 JDK 1.5 이상에서 지원

 

 

 

sqljdbc-1.2.jar

 

sqljdbc2.jar

 

sqljdbc4.jar

posted by 뚱2

링크 : http://blog.naver.com/PostView.nhn?blogId=galoa1123&logNo=120093241133&viewDate=¤tPage=1&listtype=0 

'Java > Java' 카테고리의 다른 글

[Java] System 환경 변수 읽어오기  (0) 2012.12.13
[Java] sqljdbc 버전별 드라이버  (1) 2012.10.20
[Java] Convert ArrayList<String> to String[]  (0) 2012.07.05
[Java] DateFormat  (0) 2012.07.04
[Java] google-gson  (0) 2012.06.22
posted by 뚱2

배열을 리스트로 바꾸기는 많이 해봤는데 뒤집어서 해보는건 못해봤다.


ArrayList<string> myList= new ArrayList<string>();

myList.add("테스트1");

myList.add("테스트2");

// List -> Array

String[] myArr = myList.toArray(new String[0]);

for(String s : myArr )

    System.out.println(s);


// Array -> List

List<String> myArr2  = Arrays.asList(myArr);

for (int i = 0; i < myArr2.size() ; i++) {

    System.put.pring(myArr2.get(i));

}


'Java > Java' 카테고리의 다른 글

[Java] sqljdbc 버전별 드라이버  (1) 2012.10.20
[Java] java.util.Map key 순으로 정렬하기  (0) 2012.08.01
[Java] DateFormat  (0) 2012.07.04
[Java] google-gson  (0) 2012.06.22
[Java] Java Dynamic method call  (0) 2012.02.09
posted by 뚱2

[Java] DateFormat

Java/Java 2012. 7. 4. 14:47

링크 : http://tangos.egloos.com/9483133 

'Java > Java' 카테고리의 다른 글

[Java] java.util.Map key 순으로 정렬하기  (0) 2012.08.01
[Java] Convert ArrayList<String> to String[]  (0) 2012.07.05
[Java] google-gson  (0) 2012.06.22
[Java] Java Dynamic method call  (0) 2012.02.09
[Java] map sort  (0) 2012.02.02
posted by 뚱2

[Java] google-gson

Java/Java 2012. 6. 22. 15:54

홈페이지 : http://code.google.com/p/google-gson/ 

API        : http://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/index.html 

user guide : https://sites.google.com/site/gson/gson-user-guide 

'Java > Java' 카테고리의 다른 글

[Java] Convert ArrayList<String> to String[]  (0) 2012.07.05
[Java] DateFormat  (0) 2012.07.04
[Java] Java Dynamic method call  (0) 2012.02.09
[Java] map sort  (0) 2012.02.02
[Java] instanceof 연산자  (0) 2011.11.28
posted by 뚱2

[Java] Java Dynamic method call

Java/Java 2012. 2. 9. 14:03

'Java > Java' 카테고리의 다른 글

[Java] DateFormat  (0) 2012.07.04
[Java] google-gson  (0) 2012.06.22
[Java] map sort  (0) 2012.02.02
[Java] instanceof 연산자  (0) 2011.11.28
[Java] 날짜표시 YYMMDDHH24MI  (0) 2011.11.21
posted by 뚱2

[Java] map sort

Java/Java 2012. 2. 2. 12:12

'Java > Java' 카테고리의 다른 글

[Java] google-gson  (0) 2012.06.22
[Java] Java Dynamic method call  (0) 2012.02.09
[Java] instanceof 연산자  (0) 2011.11.28
[Java] 날짜표시 YYMMDDHH24MI  (0) 2011.11.21
[Java] Java Annotation (어노테이션) 관련자료  (0) 2011.11.08
posted by 뚱2

[Java] instanceof 연산자

Java/Java 2011. 11. 28. 15:40
특정 객체가 비교하는 객체의 객체 상속도에 맞는지 확인하는 연산자
말은 어려운데 실제 보면은 간단하다.

public class AClass {
}

public class BClass extends AClass {
}

AClass aIns = new AClass();
BClass bIns = new BClass();

// 참
if ( aIns instanceof AClass ) {}

// 참
if ( bIns instanceof AClass ) {}

// 거짓
if ( aIns instanceof BClass ) {}

// 참
if ( bIns instanceof BClass ) {}

결국 검사할려는 인스턴스가 비교 객체의 자식 계통도에 포함되어 있으면 참이고
부모 계통도에 포함되어 있으면 거짓이다.
물론 상속계통도에 연관이 없는건 당연히 거짓이다.

'Java > Java' 카테고리의 다른 글

[Java] Java Dynamic method call  (0) 2012.02.09
[Java] map sort  (0) 2012.02.02
[Java] 날짜표시 YYMMDDHH24MI  (0) 2011.11.21
[Java] Java Annotation (어노테이션) 관련자료  (0) 2011.11.08
[Java] JDK와 JRE  (0) 2011.04.27
posted by 뚱2

[Java] 날짜표시 YYMMDDHH24MI

Java/Java 2011. 11. 21. 14:25


//import java.text.*;
//import java.util.*;

// YYYYMMDDHH24MI
Date d = Calendar.getInstance().getTime();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
String startDate = sdf.format(d);


'Java > Java' 카테고리의 다른 글

[Java] Java Dynamic method call  (0) 2012.02.09
[Java] map sort  (0) 2012.02.02
[Java] instanceof 연산자  (0) 2011.11.28
[Java] Java Annotation (어노테이션) 관련자료  (0) 2011.11.08
[Java] JDK와 JRE  (0) 2011.04.27
posted by 뚱2

'Java > Java' 카테고리의 다른 글

[Java] Java Dynamic method call  (0) 2012.02.09
[Java] map sort  (0) 2012.02.02
[Java] instanceof 연산자  (0) 2011.11.28
[Java] 날짜표시 YYMMDDHH24MI  (0) 2011.11.21
[Java] JDK와 JRE  (0) 2011.04.27
posted by 뚱2

[Java] JDK와 JRE

Java/Java 2011. 4. 27. 15:17

다운로드 사이트 : http://download.oracle.com/javase/6/docs/


JDK (Java Developement Kit)
- 자바를 개발하기 위한 도구의 모음
참고 : http://terms.co.kr/JDK.htm

JRE (Java Runtime Environment) 
- 자바를 구동하기 위한 환경 모음 

일반적인 자바 프로그램을 실행시킬려면 JRE만 있으면 되고
개발까지 하려면 JDK도 필요합니다. 

'Java > Java' 카테고리의 다른 글

[Java] Java Dynamic method call  (0) 2012.02.09
[Java] map sort  (0) 2012.02.02
[Java] instanceof 연산자  (0) 2011.11.28
[Java] 날짜표시 YYMMDDHH24MI  (0) 2011.11.21
[Java] Java Annotation (어노테이션) 관련자료  (0) 2011.11.08
posted by 뚱2