728x90

 1. 제어판 -> 관리도구 ->  서비스  에서  Oracle 들어간것 다 중지 시킨다.
 2. Distributed Transaction Coordinator 를 중지시킨다.
 3. 시작 -> 실행 -> regedit
     -> HKEY_LOCAL_MACHINE -> CurrentControlSet -> Services 에서  Oracle 들어간것 다 삭제
 4. Oracle 폴더 모두 삭제
 5. 재부팅


728x90
1.  스레드란 수행중인 프로그램 (프로세스) 안에 존재하는 독립적인 처리단위이다.

2.  java.lang.Thread와 java.lang.Runnable을 이용하여 새로운 스레드를 정의하고 인스턴스를 만들어서 수행시키는 
    코드를 작성한다.

3.  Synchronize제한자 및 wait(), notify(), notifyall()메서드를 이용하여 동시접근 문제를 방지하고, 스레드간의 의사
     소통을  가능하게 하는 코드를 작성한다.

4.  스레드를 사용하여 프로그램을 작성하는 방법
    a. Thread()나 Runnable을 상속받고
    b. 스레드안에서 run()메서드 수행할 내용을 오버로딩 하고
    c. 이 Thread클래스의 객체를 생성하고 start()메서드를 이용하여 run()메서드를 호출하면 된다.

5.  우선순위(PRIORITY)
    최우선 순위 ==> setPriority(Thread.MAX_PRIORITY), setPriority(10)
    중간순위   ==> setPrioirty(Thread.NROM_PRIORITY), setPriority(5)
    최하위 순위 ==> setPriority(Thread.MIN_PRIORITY), setPriority(1)
-- 그림==-

/*
 Thread 클래스 상속 예제
 */
class MyThread extends Thread
{
 public void run()// Overriding
 {
  for(char ch = 'A' ; ch<='Z' ; ch++)
  {
   System.out.print(" "+ch);
  }
 }
}
//=------------------------------------------------
class MyThread_2 extends Thread
{
 public void run()// Overriding
 {
  for(char ch = 'a'; ch<='z' ; ch++)
  {
   System.out.print(" "+ch);
  }
 }
}
//=------------------------------------------------
class ThreadTest_1
{
 public static void main( String [] args )
 {
  Thread t1 = new MyThread();
  Thread t2 = new MyThread_2();
  
  t1.setPriority(10); //우선순위 설정 10>>>>1
  //t2.setPriority(1);
  t2.setPriority(Thread.MIN_PRIORITY);
  t1.start();
  t2.start();
 }// end main
}

/*
Runnable 인터페이스 상속 예제
 */

class MyThread implements Runnable
{
 public void run()
 {
  for (int i=1 ; i<=10 ; i++)
  {
   System.out.print(" Good ");
  }
 }
}
//=------------------------------------------------
class MyThread1 implements Runnable
{
 public void run()
 {
  for(int i=1; i<=10; i++)
  {
   System.out.print(" Very ");
  }
 }
}
//=------------------------------------------------
class ThreadTest_2
{
 public static void main( String [] args )
 {
  Thread t1 = new Thread( new MyThread());
  Thread t2 = new Thread( new MyThread1());
  
  t1.start();
  t2.start();
 }// end main
}


class MyThread5 extends Thread
{
 int i = 0;
 public void run()
 {
  try
  {
   while(i<50)
   {
    i++;
    Thread.sleep(1000);  //sleep는 예외처리 해야됨.
    System.out.println("안녕" + i);
   }
  }
  catch(InterruptedException e) //누가 세치기 하면..
  {
   
  }
 }
}
class ThreadTest_3
{
 public static void main( String [] args )
 {
  Thread t = new MyThread5();
  t.start();
 }// end main
}
728x90

728x90
포멧을 이용한 출력
C언어에서 사용하던 printf() 메서드를 지원한다.

class FormatPrintTest
{
 public static void main( String [] args )
 {
  System.out.printf("%s %d","Hello",123);
 }// end main
}

+ Recent posts