Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.*;
- public class ImdbSuche {
- public static void main(String[] args) throws SQLException, ClassNotFoundException {
- String database = "";
- String server = "";
- String port = "";
- String user = "";
- String password = "";
- String keyword = "";
- int i;
- for(i=0; i<args.length/2; i++) {
- if(args[i*2].equals("-d")) database = args[i*2+1];
- else if (args[i*2].equals("-s")) server = args[i*2+1];
- else if (args[i*2].equals("-p")) port = args[i*2+1];
- else if (args[i*2].equals("-u")) user = args[i*2+1];
- else if (args[i*2].equals("-pw")) password = args[i*2+1];
- else if (args[i*2].equals("-k")) keyword = args[i*2+1];
- }
- Connection connection = DriverManager.getConnection("jdbc:db2://" + server + ":" + port + "/" + database, user, password);
- System.out.println("MOVIES");
- }
- }
Add Comment
Please, Sign In to add comment