날자별

2021 1월
 123
45678910
11121314151617
18192021222324
25262728293031

ubuntu 12.04에 자바를 설치 하는 방법

[bash] sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer [/bash]

[bash] sudo update-alternatives –config javac sudo update-alternatives –config java [/bash]

이쁘게 작성한 try-catch문

[java]public void doGet( …. ) { try { conn = getConnection(); stmt = conn.createStatement(); stmt.executeQuery(sql); …… } catch (Exception e) { …… } finally { try{ rs .close();} catch (Exception e){ } try{ stmt.close();} catch (Exception e){ } try{ conn.close();} catch (Exception e){ } } }[/java]