import java.io.*; import java.sql.*; import oracle.sqlj.runtime.Oracle; public class MenuSQLJ { static void connexion() throws SQLException { } static void deconnexion() throws SQLException { } static void selectInto() throws SQLException { } static void miseAJour1() throws SQLException { } static void miseAJour2() throws SQLException { } static void appelProc() throws SQLException { } static void appelFonct() throws SQLException { } static void curseur() throws SQLException { } static void sqldyn() throws SQLException { } static String lireClavier() { try { BufferedReader clavier = new BufferedReader(new InputStreamReader(System.in)); return clavier.readLine(); } catch(Exception e) { e.printStackTrace(); System.exit(1); return ""; } } public static void menu() throws Exception { while (true) { System.out.println("-----------------------------"); System.out.println("Bienvenue dans le menu SQLJ"); System.out.println("0 : terminer"); System.out.println("1 : selectInto"); System.out.println("2 : miseAJour1"); System.out.println("3 : miseAJour2"); System.out.println("4 : appelProc"); System.out.println("5 : appelFonct"); System.out.println("6 : curseur"); System.out.println("7 : sqldyn"); System.out.print("Entrez votre choix : "); int n = Integer.parseInt(lireClavier()); switch (n) { case 0 : return; case 1: selectInto(); break; case 2: miseAJour1(); break; case 3: miseAJour2(); break; case 4: appelProc(); break; case 5: appelFonct(); break; case 6: curseur(); break; case 7: sqldyn(); break; } } } public static void main(String[] args) throws Exception { connexion(); menu(); deconnexion(); } }